forms push button color [message #326892] |
Fri, 13 June 2008 00:15 |
srinivas.k2005
Messages: 404 Registered: August 2006
|
Senior Member |
|
|
Hi,
i am trying to set the push button color , but it is not changing.
i have set a visual attribute VA_RED
Written Code
Set_item_property('blk.push_button',VISUAL_ATTRIBUTE,'VA_RED');
but it is not atall changing the color,i tried in many ways.
Any idea why the color is not chnaging
Thanks,
Srinivas
|
|
|
|
|
|
Re: forms push button color [message #327081 is a reply to message #326978] |
Fri, 13 June 2008 12:32 |
srinivas.k2005
Messages: 404 Registered: August 2006
|
Senior Member |
|
|
Oh one more problem, now i can change color but i cannot see the label on it.
Example: i have button with name as SORT,once i change the color using iconic property it will not show the label on button,i know iconic property is only for icons, but any alternate way to change the color of the button.
|
|
|
Re: forms push button color [message #327095 is a reply to message #327081] |
Fri, 13 June 2008 15:03 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Perhaps I'm missing something here, but - why don't you simply open push button's Property Palette, go to Color node and set "Foreground Color" and "Background Color" properties to desired values?
Or, if you insist on modifying its color programatically, why not directly change background and foreground colors?set_item_property('push_button6', background_color, 'r255g0b0');
set_item_property('push_button6', foreground_color, 'r0g255b0'); Note that colors must reference RGB values.
Or, create visual attribute and apply it to the button:set_item_property('push_button6', visual_attribute, 'va');
All of these options will modify button background color and text (label) color. How do I know? I've tested the right now.
Basically, it is extremely difficult to fail to do that; I can't imagine what might have gone wrong.
|
|
|
|
|