John500
asked on
How to change a listBox 'BackColor' during runtime ?
Greetings:
I have a .Net Form Application and need to toggle a listBox background color from red to green during run-time. I realize the listBox property has this setting in the designer mode but that doesn't do me any good.
I'm guessing the syntax goes like this:
listBox1->BackColor = some hex value
If there is a list of all available colors that would be even better, otherwise red and green are fine.
I did some reading on-line and saw something like the stuff below ... is all that necessary ?
public:
virtual property Color BackColor {
Color get () override;
void set (Color value) override;
}
I have a .Net Form Application and need to toggle a listBox background color from red to green during run-time. I realize the listBox property has this setting in the designer mode but that doesn't do me any good.
I'm guessing the syntax goes like this:
listBox1->BackColor = some hex value
If there is a list of all available colors that would be even better, otherwise red and green are fine.
I did some reading on-line and saw something like the stuff below ... is all that necessary ?
public:
virtual property Color BackColor {
Color get () override;
void set (Color value) override;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks again !
Here is the right one
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingcolormemberstopic.asp