Home » Developer & Programmer » Forms » URGENT - Setting visual attribute for a particular record
URGENT - Setting visual attribute for a particular record [message #86370] Sun, 26 September 2004 03:20 Go to next message
Ansuya
Messages: 1
Registered: September 2004
Junior Member
I have designed a form using oracle Developer 6.0 for inventory control.
When I post query I would like to highlight those
particular rows or record having 'no stock'.
How do I set the record property for say foreground
color in case of no stock.This is not the same as item
property.
Please suggest
Re: URGENT - Setting visual attribute for a particular record [message #86374 is a reply to message #86370] Sun, 26 September 2004 22:13 Go to previous messageGo to next message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Hi,
Make use of SET_ITEM_INSTANCE_PROPERTY built-in to acheive this.
You cannot set the Colour of the complete record directly but isntead make use of above mentioned built-in and set the property of each item in that record.

HTH
Regards
Himanshu
Re: URGENT - Setting visual attribute for a particular record [message #86375 is a reply to message #86370] Sun, 26 September 2004 22:17 Go to previous messageGo to next message
Kanwar M. Abid
Messages: 2
Registered: March 2004
Junior Member
You can place this code in POST-QUERY Trigger.
here in this example
BLOCK_NAME = Your Block Name
COLUMN_NAME = You Column Name
and you have to create 2 Visual Attribute e.g VA_NO_STOCK for no stock and VA_STOCK for stock.

DECLARE
cur_itm VARCHAR2(80);
cur_block VARCHAR2(80) := :System.Cursor_Block;
BEGIN
cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
WHILE ( cur_itm IS NOT NULL ) LOOP
cur_itm := cur_block||'.'||cur_itm;
IF :BLOCK_NAME.COLUMN_NAME IS NULL then
Set_Item_Instance_Property( cur_itm, CURRENT_RECORD,
VISUAL_ATTRIBUTE,'VA_NO_STOCK');
ELSE
Set_Item_Instance_Property( cur_itm, CURRENT_RECORD,
VISUAL_ATTRIBUTE,'VA_STOCK');
END IF;
cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
END LOOP;
END;
Re: URGENT - Setting visual attribute for a particular record [message #86376 is a reply to message #86370] Sun, 26 September 2004 22:19 Go to previous message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
u need to use set_item_property only and set the visual attribute to required one.

by
vamsi
Previous Topic: login form
Next Topic: User Problem
Goto Forum:
  


Current Time: Mon Sep 09 17:12:12 CDT 2024