Solved

vfp9  command buttons

Posted on 2013-01-07
2
690 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 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

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…
Part One of the two-part Q&A series with MalwareTech.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

617 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