Working With Push Buttons In Oracle Forms
2016-12-25 14:13
1731 查看
[align=justify]Managing push buttons at run time in Oracle Forms is very simple and in this tutorial you will learn to enable or disable the buttons, making visible and invisible buttons and will learn to change the label text of a button.[/align] [align=justify] [/align] [align=justify]In the below mentioned examples I am using toggle functionality for buttons, means if the button is enabled or visible then it will be disable or invisible by using Get_Item_Property and Set_Item_Property commands.[/align] [align=justify] [/align] [align=justify]Below is the screen shot of the form and you can download the form from the following link:[/align] [align=justify] Download Form[/align]
[align=justify] [/align] [align=justify]To perform this functionality I used buttons and written the When-Button-Pressed trigger to make the changes in other button's functionality.[/align]
The following is the code:
If Get_Item_Property('control.pb_endb', enabled) = 'FALSE' Then
Set_Item_Property('control.pb_endb', enabled, Property_True);
Else
Set_Item_Property('control.pb_endb', enabled, Property_False);
End if;
End;
If Get_Item_Property('control.pbvs', Visible) = 'FALSE' Then
Set_Item_Property('control.pbvs', Visible, Property_True);
-- Make enable also
Set_Item_Property('control.pbvs', Enabled, Property_True);
Else
Set_Item_Property('control.pbvs', Visible, Property_False);
End if;
End;
If :control.txtbuttonlbl Is Not Null Then
Set_Item_Property('control.pblbl', Label, :control.txtbuttonlbl);
End if;
End;
[align=justify] [/align] [align=justify]To perform this functionality I used buttons and written the When-Button-Pressed trigger to make the changes in other button's functionality.[/align]
The following is the code:
Making Button Toggle Enable / Disable
BeginIf Get_Item_Property('control.pb_endb', enabled) = 'FALSE' Then
Set_Item_Property('control.pb_endb', enabled, Property_True);
Else
Set_Item_Property('control.pb_endb', enabled, Property_False);
End if;
End;
Making Button Toggle Visible / Invisible
BeginIf Get_Item_Property('control.pbvs', Visible) = 'FALSE' Then
Set_Item_Property('control.pbvs', Visible, Property_True);
-- Make enable also
Set_Item_Property('control.pbvs', Enabled, Property_True);
Else
Set_Item_Property('control.pbvs', Visible, Property_False);
End if;
End;
Changing Label Text
BeginIf :control.txtbuttonlbl Is Not Null Then
Set_Item_Property('control.pblbl', Label, :control.txtbuttonlbl);
End if;
End;
相关文章推荐
- Changing Icon File Of Push Button At Runtime In Oracle Forms 6i
- An Example of Pre-Query and Post-Query Triggers in Oracle Forms With Using Display_Item to Highlight Dynamically
- Working with Multiple Forms in Visual Basic .NET: Upgrading to .NET
- Horizontal Toolbar With Navigational Buttons Form Sample For Oracle Forms 10g/11g
- VS2015中使用Git遇到问题 Cannot do push / pull in git - working with visual studio
- Populate A List Item With Record Group In Oracle Forms Using Populate_List And Create_Group_From_Query Command
- Quick Trick About Using Dbms_Metadata With Forms_DDL In Oracle Forms
- Populating Tree Item With Record Group In Oracle Forms
- Populate A List Item With Record Group In Oracle Forms Using Populate_List And Create_Group_From_Query Command
- Set Font Properties On Mouse Hover Of Push Button And Text Items At Run time In Oracle Forms
- Using Single Alert For Messages And Confirmation Messages In Oracle Forms With Set_Alert_Button_Property
- START WITH and CONNECT BY in Oracle
- A book Working with Data in ASP.NET 2.0 by Scott Mitchell
- Generating and working with GUIDs in .NET
- Working with Linux Files and Folders in Bash
- 好文推荐:Development Tools and Techniques for Working with Code in Windows SharePoint Services 3.0
- Optimistic Locking with Concurrency in Oracle
- 《oracle pl/sql programming》 第7章 working with data
- Working with XML in a Classic COM Application
- 翻译 在chrome代码中操作窗口 Working with windows in chrome code