Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change color of commandbuttons
Message
From
07/10/1998 15:09:37
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00144491
Message ID:
00144735
Views:
23
The only way I have found to directly change the color of the button would be using a windows api call. I have created a button class with this code:

**got focus event
for i=1 to 5
this.top=this.top -1
this.left=this.left-1
this.height=this.height+2
this.width=this.width +2
next
this.forecolor=rgb(0,0,255)

**lostfocus event
for i=1 to 5
this.top=this.top+1
this.left=this.left+1
this.height=this.height-2
this.width=this.width -2
next
this.forecolor=rgb(0,0,0)

This has the effect of changing both the font color and the size of the button when it gets focus so the user knows exactly where he is at any time.
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Previous
Reply
Map
View

Click here to load this message in the networking platform