Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Back Color Of Item When Item Has Focus

Status
Not open for further replies.

Creepers

Programmer
Nov 11, 2002
116
US
New to Oracle Forms... running 6i. I would like to know how to change the back color of an item on a datablock when that item receieves focus. After the item loses focus then go back to its orginal color.

Thanks in advance... Creepers
 
Create 2 visual attributes: CURRENT and DEFAULT. Then create pre-text-item trigger:

Code:
set_item_instance_property(:system.trigger_item, :system.trigger_record, VISUAL_ATTRIBUTE, 'CURRENT' );

Then create post-text-item trigger:

Code:
set_item_instance_property(:system.trigger_item, :system.trigger_record, VISUAL_ATTRIBUTE, 'DEFAULT' );


Regards, Dima
 
Thanks for your response. However, I am wanting to change the back color of all items on a data block (not just text items).
Maybe I am asking the wrong question. When navigating from on item on a canvas to the next, the users want to be able to more "clearly see" what item has focus. Is there a better way of handling this request?

Thanks
Creepers
 
Normally current item is highligted by Forms or contains blinking cursor. As for my code suggested you may move it to item level.

Regards, Dima
 
Thanks again. However, I was wanting to avoid putting the trigger at the item level.
 
The current visual attribute may be set at the block level too.

Beware of false knowledge; it is more dangerous than ignorance. ~George Bernard Shaw
Systems Project Analyst/Custom Forms & PL/SQL - Oracle/Windows
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top