Home » Developer & Programmer » Forms » How to change a color of a button (Forms 6i)
How to change a color of a button [message #360734] Sun, 23 November 2008 17:12 Go to next message
sindikalac
Messages: 52
Registered: November 2008
Location: Europe
Member
Hi,
How can I change a color of a button if a condition is satisfied. For example, "if :item1 is not null" I would like to change a color of a button into red.
Re: How to change a color of a button [message #360766 is a reply to message #360734] Mon, 24 November 2008 00:14 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Use the SET_ITEM_PROPERTY built-in, such as
set_item_property('button_item', background_color, 'r100g0b0');
Note that colors have to be set as a reference to an RGB value.
Re: How to change a color of a button [message #360901 is a reply to message #360766] Mon, 24 November 2008 05:31 Go to previous messageGo to next message
sindikalac
Messages: 52
Registered: November 2008
Location: Europe
Member
Thanks, that was very useful.
Re: How to change a color of a button [message #361351 is a reply to message #360901] Wed, 26 November 2008 01:06 Go to previous messageGo to next message
athar.fitfd@hotmail.com
Messages: 193
Registered: October 2007
Location: pakistan
Senior Member
This is not working

Athar
Re: How to change a color of a button [message #361374 is a reply to message #361351] Wed, 26 November 2008 02:36 Go to previous messageGo to next message
sindikalac
Messages: 52
Registered: November 2008
Location: Europe
Member
It was a good hint for me. I just adjusted the above command into:

set_item_property('button_item', VISUAL_ATTRIBUTE, 'RED');

and changed Iconic to Yes.
Re: How to change a color of a button [message #361569 is a reply to message #361374] Thu, 27 November 2008 00:50 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I didn't think it worked for iconic buttons. What you would do there is use a different coloured icon.

David
Previous Topic: Tracking cursor position in text items
Next Topic: using xmltype and clob in oracle forms 10g
Goto Forum:
  


Current Time: Fri Dec 02 14:15:36 CST 2016

Total time taken to generate the page: 0.14443 seconds