change current item visual attrib [message #223782] |
Sun, 11 March 2007 07:25 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
vdsk
Messages: 41 Registered: February 2006 Location: India & UAE
|
Member |
|
|
I have multi row block in Enter Query mode . I want to change current item background color. I have put when-new-items-instance trig at form level; code is Set_Item_instance_Property(:SYSTEM.CURRENT_ITEM, CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VA_GREEN'); and post-text-item trig as
Set_Item_instance_Property(:SYSTEM.CURRENT_ITEM, CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VA_WHITE');
This works when form is under query executing mode (after I press F8)..
But at the time of entering query criteria all navigated items change to VA_GREEN.
How to arrest this ??
I am using Forms 6i
|
|
|
|
Re: change current item visual attrib [message #223832 is a reply to message #223800] |
Sun, 11 March 2007 23:31 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
vdsk
Messages: 41 Registered: February 2006 Location: India & UAE
|
Member |
|
|
Hi...
thanx for ur suggn ..but this means if I have 20 items in block
then I have to put trig for each item??
Well, I tried it anyway but with same result...
My prob is in Enter-query mode only where all navigated items turn Green and stays the same..
I tried it like this in both trigs ,when-new-item-instance and post-text-item but no luck...
IF :System.Mode = 'ENTER-QUERY' THEN
Set_Item_instance_Property(:SYSTEM.CURRENT_ITEM, CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VAPREV');
end if;
any more suggns plz..?
|
|
|
Re: change current item visual attrib [message #223883 is a reply to message #223832] |
Mon, 12 March 2007 03:25 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Well, I tried that too; using the WHEN-NEW-ITEM-INSTANCE trigger at item level worked fine for me.
P.S. I forgot to mention: I used Oracle Forms Developer 10g, as I don't have 6i to test it. Perhaps that makes the difference (but, sincerely, I don't think so).
[Updated on: Mon, 12 March 2007 03:26] Report message to a moderator
|
|
|
Re: change current item visual attrib [message #223896 is a reply to message #223883] |
Mon, 12 March 2007 03:59 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
vdsk
Messages: 41 Registered: February 2006 Location: India & UAE
|
Member |
|
|
I tried it at item level also for 2 -3 items in block..
Infact both trigs When-new-item-instance & post-text..
But still same ..that is..all navigated items -when i am in ENTER-QUERY mode turns GREEN..but it works as expected in execute-query mode..!! I even tried with system.mode variable in both trigs..
post-text-item:
Set_Item_instance_Property(:SYSTEM.CURRENT_ITEM, CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VA_WHITE');
when-new-item-instance:
Set_Item_instance_Property(:SYSTEM.CURRENT_ITEM, CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VA_GREEN');
But I have an application -ORION- here in Forms6i where it
happens. Badluck no fmb's..
Hope I can try & sort it out...
Thanks..
|
|
|
Change current item visual attrib-in ENTER-QUERY mode [message #223941 is a reply to message #223883] |
Mon, 12 March 2007 06:05 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
vdsk
Messages: 41 Registered: February 2006 Location: India & UAE
|
Member |
|
|
Hi all..
Let me pinpoint my problem. I want to change color of the current item to Green in ENTER-QUERY mode. And all other items must be in White. So once I press enter or click to an item it should turn Green and the previous one should change back to default (or White in my case). I have defined the required VA's. I have When-new-item-instance trigger at Form level which turns the navigated item to Green. But the post-text-item at Form level is not returning the prev item to default. This is bcoz Post-text-item does not fire in Enter-query mode...
So which triggr or what other way to accomplish the color change back to default...??
|
|
|
|
|
Re: Change current item visual attrib-in ENTER-QUERY mode [message #225694 is a reply to message #225441] |
Wed, 21 March 2007 00:36 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
If you want a trigger to fire in Enter-Query mode then you have to change the 'Fire in Enter-Query Mode' to 'Yes'. When a trigger is created this parameter is defaulted to 'No'.
By the way, have a good look at the block and item property 'Current Record Visual Attribute Group'.
David
|
|
|