Navigate Canvas items

To discuss Oracle Forms & Reports related technical issues.
Post Reply
Kashif
Posts: 137
Joined: Wed Apr 26, 2006 5:57 am
Location: Pakistan
Contact:

Navigate Canvas items

Post by Kashif »

Asslam-o-Alaikum Dear all Memebrs.

In a FORM i have many Items Like
Display Items, Text Items, Radio Button, Push Buttons etc.

I want to navigate all Items the VIA LOOP.
and want to Change the Properties of Some Items of TYPE DISPALY ITEM.

How can i do this?



Best Regards.

Muhammad Kashif
admin
Posts: 2063
Joined: Fri Mar 31, 2006 12:59 am
Location: Pakistan
Contact:

Post by admin »

Display items don't have navigation property.
Kashif
Posts: 137
Joined: Wed Apr 26, 2006 5:57 am
Location: Pakistan
Contact:

Post by Kashif »

Sorry Little Mistake in presenting my Problem.

I want to Find all the Display Item using a LOOP (RUN TIME).
and then Want to Change its Proprty. for example changing its FOREGROUND color.



Best Regards.

Muhammad Kashif
admin
Posts: 2063
Joined: Fri Mar 31, 2006 12:59 am
Location: Pakistan
Contact:

Post by admin »

You can't get focus of an item which don't have navigation properties.thanks
Kashif
Posts: 137
Joined: Wed Apr 26, 2006 5:57 am
Location: Pakistan
Contact:

Post by Kashif »

[quote]You can't get focus of an item which don't have navigation properties.thanks

<i><div align="right">Originally posted by admin
mirza_rehan
Posts: 132
Joined: Sun Apr 02, 2006 10:36 am
Location: Pakistan

Post by mirza_rehan »

Here is sample code for yours required task, hope it will help you. I assue first item is button and this trigger code put on that buttion

<b>Declare
v_NxtItm Varchar2(30) := :System.Trigger_Item;
Begin
Loop
v_NxtItm := Get_Item_Property(v_NxtItm,NextItem);
if Get_Item_Property(v_NxtItm,Item_Type) = 'DISPLAY ITEM' then
Set_Item_Property(v_NxtItm,Visual_Attribute,'DI_VA');
End If;
Exit When
Get_Block_Property(:System.Trigger_Block,Last_Item) = v_NxtItm;
End Loop;
End;</b>


Second option use this code on <b>WHEN-NEW-FORN-INSTANCE</b>

<b>Declare
v_NxtItm Varchar2(30) := Get_Block_Property('B1',First_Item);
Begin
Loop
if Get_Item_Property(v_NxtItm,Item_Type) = 'DISPLAY ITEM' then
Set_Item_Property(v_NxtItm,Visual_Attribute,'DI_VA');
End If;
Exit When
Get_Block_Property(:System.Trigger_Block,Last_Item) = v_NxtItm;
v_NxtItm := Get_Item_Property(v_NxtItm,NextItem);
End Loop;
End;</b>

if any problem exist please reply

take care
Allah Hafiz

Best regards,
R E H A N M I R Z A
System Analyst / Senior Oracle Developer
Cell: +92-304-2120807

When ever you pray
Please remember me and my family
Kashif
Posts: 137
Joined: Wed Apr 26, 2006 5:57 am
Location: Pakistan
Contact:

Post by Kashif »

Thanx Mirza sb.

Both are working Fine.

how can i check what value or text is in the Display item.

Best Regards.

Muhammad Kashif
admin
Posts: 2063
Joined: Fri Mar 31, 2006 12:59 am
Location: Pakistan
Contact:

Post by admin »

This is nice that your problem is resolved. thanks to Rehan.
mirza_rehan
Posts: 132
Joined: Sun Apr 02, 2006 10:36 am
Location: Pakistan

Post by mirza_rehan »

check this code , Bold letter are solved yours new requirement

Declare
v_NxtItm Varchar2(30) := Get_Block_Property('B1',First_Item);
v_Val Varchar2(50);
Begin
Loop
if Get_Item_Property(v_NxtItm,Item_Type) = 'DISPLAY ITEM' then
<b>v_Val := Name_In(v_NxtItm);
Message(v_Val);</b>
Set_Item_Property(v_NxtItm,Visual_Attribute,'DI_VA');
End If;
Exit When
Get_Block_Property(:System.Trigger_Block,Last_Item) = v_NxtItm;
v_NxtItm := Get_Item_Property(v_NxtItm,NextItem);
End Loop;
End;

take care

Best regards,
R E H A N M I R Z A
System Analyst / Senior Oracle Developer
Cell: +92-304-2120807

When ever you pray
Please remember me and my family
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests