Property Boolean Button_Shadow_State
| Read Access: | Get Button_Shadow_State to BooleanVariable |
| Write Access: | Set Button_Shadow_State to BooleanVariable/Value |
If the Button_Shadow_State property is set True, the tab page will be inaccessible.
It does not shadow the tab page or the button, it simply makes it inaccessible.
Default is False.
A method to display whether the tab page is accessible or not is to display a bitmap on the tab page button in front of the tab page label that indicates the tab page is disabled. The sample code below demonstrates this.
Class cMyTabPage is a TabPage
Procedure Construct_Object
Forward Send Construct_Object
Set piImageIndex to -1
End_Procedure
Procedure Set Button_Shadow_State Integer iState
Forward Set Button_Shadow_State to iState
If (iState) Begin
Set piImageIndex to 0
End
Else Begin
Set piImageIndex to -1
End
End_Procedure
End_Class
The following code shows how you can use that:
Code:
Deferred_View Activate_oShadowTabView for ;
Object oShadowTabView is a dbView
Set Border_Style to Border_Thick
Set Size to 235 300
Set Location to 2 2
Object oTabDialog1 is a TabDialog
Set Size to 200 285
Set Location to 26 5
Object oTabPage1 is a cMyTabPage
Set Label to 'oTabPage1'
Object oForm1 is a Form
Set Size to 13 100
Set Location to 62 29
' End_Object
End_Object
Object oTabPage2 is a cMyTabPage
Set Label to 'oTabPage2'
Object oForm2 is a Form
Set Size to 13 100
Set Location to 47 49
End_Object
End_Object
Object oTabPage3 is a cMyTabPage
Set Label to 'oTabPage3'
Object oForm3 is a Form
Set Size to 13 100
Set Location to 74 50
End_Object
End_Object
Object oImageList32 is a cImageList32
Procedure OnCreate
Integer iImage
Get AddImage "ActionDelete.Ico" to iImage
End_Procedure
End_Object
Set phoImageList to oImageList32
End_Object
Object oToggleTabEnabledCheckBox is a CheckBox
Set Size to 10 70
Set Location to 6 17
Set Label to 'Toggle Enable Tab 2'
Procedure OnChange
Boolean bChecked
Get Checked_State to bChecked
Set Button_Shadow_State of oTabPage2 to bChecked
End_Procedure
End_Object
Cd_End_Object