Home » Developer & Programmer » Forms » changing the button color at runtime (oracle forms 6i)
changing the button color at runtime [message #540240] Sat, 21 January 2012 01:49 Go to next message
nareshvictory
Messages: 52
Registered: December 2011
Location: chennai
Member
hi all,

i want to change the button color in the runtime. is it possible
by using set_item_property. if not, can we set by using property palette at design time.

i tried by setting the property in both ways but it's not working

any suggestions accepted


Re: changing the button color at runtime [message #540254 is a reply to message #540240] Sat, 21 January 2012 03:02 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't have Forms here (especially 6i version) so I can't check Online Help, but Forms 9i documentation says that BACKGROUND_COLOR is valid for items, tab pages, radio buttons, canvases and windows. Buttons aren't mentioned, so I *suppose* that you can't do that. Though, someone might know better.

Possible workaround? Create two buttons, one on the top of another, with different background colors. Then, during runtime, display/hide them - to the end user, it would be the same as if a button changed its color.
In order to easily maintain code behind the button (i.e. WHEN-BUTTON-PRESSED trigger), put its code into a procedure and simply call that procedure from both buttons' WHEN-BUTTON-PRESSED triggers.
Re: changing the button color at runtime [message #540255 is a reply to message #540254] Sat, 21 January 2012 03:08 Go to previous messageGo to next message
Tomcrzy
Messages: 101
Registered: December 2011
Location: Chennai,India
Senior Member

Yes Littlefoot,

We cannot change the button color in forms, and there is no property to set the button color.
Re: changing the button color at runtime [message #540257 is a reply to message #540255] Sat, 21 January 2012 03:17 Go to previous message
nareshvictory
Messages: 52
Registered: December 2011
Location: chennai
Member
thank you littlefoot
Previous Topic: i need help with show items
Next Topic: how to set lov search value
Goto Forum:
  


Current Time: Mon Sep 16 06:10:08 CDT 2024