Home » Developer & Programmer » Forms » tabuler recoreds (form6i)
icon13.gif  tabuler recoreds [message #324410] Mon, 02 June 2008 06:58 Go to next message
AshrafKittaneh26
Messages: 18
Registered: June 2008
Location: UAE
Junior Member
hi guys,


I have a prob. that i want to color the tabuler with two deferent colores, like for example: first recored with red and seconed one with blue, and thired with red, and forth with blue .....etc.
it means one by one. Confused

its urgent guys.
thanks.
Re: tabuler recoreds [message #324432 is a reply to message #324410] Mon, 02 June 2008 08:25 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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:

/forum/fa/4390/0/

Re: tabuler recoreds [message #324521 is a reply to message #324478] Mon, 02 June 2008 23:33 Go to previous messageGo to next message
AshrafKittaneh26
Messages: 18
Registered: June 2008
Location: UAE
Junior Member
thanks man, thats what i'm talking about. it is working now.
thanku u verry much. Laughing
Re: tabuler recoreds [message #324762 is a reply to message #324521] Tue, 03 June 2008 23:33 Go to previous messageGo to next message
Dipali Vithalani
Messages: 278
Registered: March 2007
Location: India
Senior Member
ohh.. that's my mistake... I was suppose to reply what you did littlefoot. Thank you for pointing out my mistake....

Regards..
Re: tabuler recoreds [message #328630 is a reply to message #324410] Fri, 20 June 2008 22:48 Go to previous messageGo to next message
amdabd
Messages: 91
Registered: November 2007
Location: My Computer
Member
thanks Littlefoot Smile
Re: tabuler recoreds [message #333526 is a reply to message #328630] Sat, 12 July 2008 03:26 Go to previous message
mohan1760
Messages: 59
Registered: June 2008
Member
i got my answer without even posting question,thank you all who contributed.
Previous Topic: Using Webutil, can not use Client_ole2
Next Topic: INSERT IMAGE IN 10G DATABASE
Goto Forum:
  


Current Time: Mon Feb 03 06:58:50 CST 2025