display problem [message #422629] |
Fri, 18 September 2009 00:16 |
shaz
Messages: 182 Registered: June 2009
|
Senior Member |
|
|
hello all,
I have a requirement that i have to show the second character of the text item highlighted. It can be bold, colored different, background colored, etc.
Example--- 12345678 or
12345678
Is it possible???
SET_ITEM_PROPERTY('field', FOREGROUND_COLOR , 'r50g88b0');
this will color all the characters in field.
|
|
|
Re: display problem [message #422652 is a reply to message #422629] |
Fri, 18 September 2009 02:21 |
bahubcd
Messages: 40 Registered: July 2007 Location: Bangalore
|
Member |
|
|
Hi Shaz,
This is one of the limitations of Oracle forms. I dont think you can achieve it that way.
What I can suggest you is you break up
12345678 in to 3 text items ABC.
A= 1
B = 2
C = 345678.
And give the color Blue and other characteristics to the text item B.
You can place A,B,C close to each other without a gap so that the user feels that he is looking at a single number.
You can easily attain the above using available string and numeric functions in Oracle.
Regards,
Bahubcd.
|
|
|
Re: display problem [message #422858 is a reply to message #422652] |
Sun, 20 September 2009 19:44 |
linlasj
Messages: 98 Registered: August 2005 Location: Linköping
|
Member |
|
|
bahubcd wrote on Fri, 18 September 2009 09:21Hi Shaz,
This is one of the limitations of Oracle forms. I dont think you can achieve it that way.
What I can suggest you is you break up
12345678 in to 3 text items ABC.
A= 1
B = 2
C = 345678.
And give the color Blue and other characteristics to the text item B.
You can place A,B,C close to each other without a gap so that the user feels that he is looking at a single number.
You can easily attain the above using available string and numeric functions in Oracle.
Regards,
Bahubcd.
...or write a java thingy. That could solve this as well. I have seen java things written to do other stuff with the field once it is displayed to the user.
And...no...I do not write java myself. On the other hand...the suggestion above might work. But tricky to maintain and support. However, if there is proper documentation on WHY you did it this way and WHAT to think about in changing. I would go with the solution above. And I am out on a limb regarding java...it might be very tricky to solve this in java.
|
|
|
Re: display problem [message #422859 is a reply to message #422858] |
Sun, 20 September 2009 19:48 |
linlasj
Messages: 98 Registered: August 2005 Location: Linköping
|
Member |
|
|
No. GO with Bahubcd's suggestion.
Pleast study the string capabilities in Oracle SQL.
There are some sites that are useful. Like this one http://www.psoug.org/reference/substr_instr.html
Since you suggest that it can be color and or italics or bold I suggest that you encapsule some types of changes in a procedure. or a function. just make it easy for you...and do some routines.
SET_ITEM_PROPERTY('field', FOREGROUND_COLOR , 'r50g88b0');
btw...foreground color? Is that the color of the number? It probably is...so you have one function there to write if the second digit should be bold.
[Updated on: Sun, 20 September 2009 19:51] Report message to a moderator
|
|
|
|
|
|