Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

vfp9  command buttons

Posted on 2013-01-07
2
Medium Priority
?
697 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 2000 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 43

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
Following on from our article on "The Murky World of Consent and opt in", we thought we would issue some helpful guidance, not only on consent itself but knowing what information you are capturing, what you are doing with this data and how you can p…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

927 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