Solved

vfp9  command buttons

Posted on 2013-01-07
2
681 Views
Last Modified: 2013-01-07
Hi Experts

I have more than 20 command buttons on my form.
I would like to find the name of command button clicked so that I can set the backcolor of that button different to the rest on the form.
or
is there different way of showing different backcolor of the button just clicked to the rest of the buttons on my form.

Thanks
0
Comment
Question by:b001
2 Comments
 
LVL 27

Accepted Solution

by:
CaptainCyril earned 500 total points
ID: 38751626
If you based it on a class then in the Click Event:

This.BackColor = RGB(128,0,0)

You will also have to reset the colors of the rest in a loop.
0
 
LVL 42

Expert Comment

by:pcelba
ID: 38751693
Maybe the command buttons are not the right control in your case...
If you would use OptionGroup then you may simply see the last option clicked.
But it allows to have just one option clicked...

So you could use graphical checkboxes (checkbox with Style = 1) which directly show the button status.

If you persist on command buttons then the answer from Captain is OK.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
FOXPRO 2.6 DISTRIBUTION KIT 7 397
not sure how to proceed 6 425
Using UDFs in grids 3 246
Fox pro using the copy command 5 47
Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question