|
Re: tabuler recoreds [message #324432 is a reply to message #324410] |
Mon, 02 June 2008 08:25 |
Dipali Vithalani
Messages: 278 Registered: March 2007 Location: India
|
Senior Member |
|
|
You can do it by using set_record_property ().
you have to write a code for loop which moves from first to last record and for each record, using above function, you can set background color , foreground color, or any other property.
Regards.
|
|
|
Re: tabuler recoreds [message #324478 is a reply to message #324432] |
Mon, 02 June 2008 12:40 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
SET_RECORD_PROPERTY? Would you, vithalani_dipali, mind to share the code how to do that? Because, the only valid record status in my Forms Builder version (10g) is "STATUS"; no foreground color, no background color.
In the meantime, I'd like to suggest another approach: deciding which record to paint to which color is easy - MOD function will help us do that. Forms built-in we have to use is SET_ITEM_INSTANCE_PROPERTY. Unfortunately, there's no way to paint the whole record at once - you'll have to do it item by item.
Here's an example: create two visual attributes: "red" will have "red" background, while "blue" will have "blue" background. POST-QUERY trigger on the "dept" block (based on Scott's schema) looks like this:if mod(:system.trigger_record, 2) = 0 then
set_item_instance_property('deptno', current_record, visual_attribute, 'red');
set_item_instance_property('dname' , current_record, visual_attribute, 'red');
set_item_instance_property('loc' , current_record, visual_attribute, 'red');
else
set_item_instance_property('deptno', current_record, visual_attribute, 'blue');
set_item_instance_property('dname' , current_record, visual_attribute, 'blue');
set_item_instance_property('loc' , current_record, visual_attribute, 'blue');
end if;
This is the final result:
|
|
|
|
|
|
|