Home » Developer & Programmer » Forms » How to change the color of text item?
How to change the color of text item? [message #209024] Wed, 13 December 2006 00:21 Go to next message
smulukutla
Messages: 45
Registered: May 2006
Member
I need to know how to change the color of a display item in a block. urgent Please.

Thanks.
Re: How to change the color of text item? [message #209031 is a reply to message #209024] Wed, 13 December 2006 00:41 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Define a visual attribute with the colour you want and use 'set_item_instance_property(visual_attribute)' to apply it to an item.

David
Re: How to change the color of text item? [message #209172 is a reply to message #209024] Wed, 13 December 2006 10:30 Go to previous messageGo to next message
smulukutla
Messages: 45
Registered: May 2006
Member
I am trying to define, but I couldn't get it.
If you have an example, please forward it to me.

Thanks for your reply.
Re: How to change the color of text item? [message #209245 is a reply to message #209172] Wed, 13 December 2006 23:13 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
No. What code have you tried? What results do you get?

Create a VA group - call it va_normal, define a font and make the background colour 'blue'. Create another VA group - call it va_red, base (INHERIT) this VA on va_normal and change the background colour to 'red'.

Have a single field on the screen plus two buttons. In one button have a 'set_item_instance_property' statement to change the one displayed item to va_normal (remember to put a 'synchronize' after the SIIP). In the other button have the same code but use va_red.

Compile and run the form. Press a button. Press the other button. The background colour should change from blue to red to blue.

I assume you have a copy of the Forms reference manual so you know the syntax of the SIIP command. If not, read the sticky, follow the links and get a copy (I prefer the 6.0 reference manual which is a single PDF file.)

David
Re: How to change the color of text item? [message #209975 is a reply to message #209245] Mon, 18 December 2006 17:24 Go to previous messageGo to next message
smulukutla
Messages: 45
Registered: May 2006
Member
Can you please explain me what is putting a 'synchronize' after the SIIP.

Thanks.
Re: How to change the color of text item? [message #209994 is a reply to message #209975] Mon, 18 December 2006 20:05 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
'synchronize' is a command, 'SIIP' is the abbreviation of 'set_item_instance_property' which I mentioned earlier in the sentence.

Get a copy of the Forms reference manual and read it. Please.

David
Previous Topic: Data Block Property - Key Mode - Non updatable for Views
Next Topic: Oracle Forms9i Error - HTTP 500 - Internal Server Error
Goto Forum:
  


Current Time: Wed Dec 07 03:19:25 CST 2016

Total time taken to generate the page: 0.11013 seconds