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
Navigate Canvas items
-
- Posts: 132
- Joined: Sun Apr 02, 2006 10:36 am
- Location: Pakistan
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
<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
-
- Posts: 132
- Joined: Sun Apr 02, 2006 10:36 am
- Location: Pakistan
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
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
Who is online
Users browsing this forum: No registered users and 2 guests