Home » Developer & Programmer » Forms » each second record with different background_color
each second record with different background_color [message #85580] Fri, 09 July 2004 15:21 Go to next message
hudo
Messages: 165
Registered: May 2004
Senior Member
Hello,

to improve legibility, I would like to display always the second row with another (lets say green) background_color.
Therefore I created a BLOCK - Post-Query Trigger containing the following lines:

--IF (:EMP.COMM IS NULL) THEN
IF (MOD (TO_NUMBER(:SYSTEM.CURSOR_RECORD), 2) = 0 ) THEN
SET_ITEM_INSTANCE_PROPERTY('EMP.ENAME', CURRENT_RECORD, VISUAL_ATTRIBUTE ,'GREEN_BACKGROUND');
END IF;

NULL;

My first problem: I do not know how to the determine the whole record, therefore I just used EMP.ENAME
Second problem: The green background starts at record number 7 (if the first record is number 1, (is this so, or does it start with zero ??)), and then number 9, 11, 13 (from scott.emp) has a green background-color.

Please give me some advice
Re: each second record with different background_color [message #85584 is a reply to message #85580] Sat, 10 July 2004 17:16 Go to previous messageGo to next message
hudo
Messages: 165
Registered: May 2004
Senior Member
Ok, one problem solved:

....
IF ( MOD ( TO_NUMBER (:SYSTEM.TRIGGER_RECORD) , 2 ) = 0 ) THEN
...

Now remains: how can I access the whole record, not just one item of the record ?
Re: each second record with different background_color [message #484664 is a reply to message #85584] Thu, 02 December 2010 04:43 Go to previous message
pushpendra.tomar
Messages: 11
Registered: January 2007
Location: Hyderabad
Junior Member
Hi,

You can use following built-in

SET_BLOCK_PROPERTY('BLOCK_NAME',CURRENT_ROW_BACKGROUND_COLOR,'R100G0B0');

This call will set the background color to red for entire record which has cursor focus on it...

Thanks,
Pushpendra Tomar
Previous Topic: Populating a non database item via a LOV after query
Next Topic: FRM-50016: legal characters are 0-9 - + E
Goto Forum:
  


Current Time: Thu Sep 19 13:49:24 CDT 2024