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;