Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

vfp9  command buttons

Posted on 2013-01-07
2
Medium Priority
?
692 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
Check out what's been happening in the Experts Exchange community.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

715 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