|
|
|
|
|
|
Re: what is the code to change propert of a button? [message #173546 is a reply to message #173375] |
Tue, 23 May 2006 02:23 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/43055.jpg) |
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
djmartin wrote on Mon, 22 May 2006 10:09 | But I have this doubt as to whether you can 'disable' a button but I can't see it in the documentation.
| Yes you can. I've attached a small example.
For those unable to download it: The form consists of
- an alert MYALERT
- a control block CTRL
- a push button PB_ENABLE_DISABLE with label 'Disable'
- a push button PB_NOTHING with label 'Nothing'
PB_ENABLE_DISABLE will switch the enabled property of push button PB_NOTHING. PB_NOTHING will show myalert.
Button PB_ENABLE_DISABLE has the following code:
Begin
If Get_Item_Property('CTRL.PB_NOTHING', ENABLED) = 'TRUE'
Then
Set_Item_Property('CTRL.PB_NOTHING', ENABLED, Property_False);
Set_Item_Property('CTRL.PB_ENABLE_DISABLE', LABEL, 'Enable');
Else
Set_Item_Property('CTRL.PB_NOTHING', ENABLED, Property_True);
Set_Item_Property('CTRL.PB_ENABLE_DISABLE', LABEL, 'Disable');
End If;
End;
Button PB_NOTHING has the following code:
Declare
pb PLS_INTEGER;
Begin
pb := Show_Alert('MyAlert');
End;
Granted, quick and dirty but it demonstrates the use.
MHE
[Updated on: Tue, 23 May 2006 02:24] Report message to a moderator
|
|
|