
Check box on a panel on a tabbed dialog
can't say why things are disappearing, but I can provide a "shortcut" to
make coding easier....
You are basically doing a Boolean check and setting the state based on the
value of each checkbox. Instead of the code you have below, you could use:
Private Sub Check1_Click(Index As Integer)
SSTab1.TabEnabled(1) = Check1(0).Value = 1
SSTab1.TabEnabled(2) = Check1(1).Value = 1
End Sub
Alternatively, you could also use:
Private Sub Check1_Click(Index As Integer)
SSTab1.TabEnabled(Index + 1) = Check1(Index).Value = 1
End Sub
--
Randy Birch, MVP Visual Basic
VBnet, The Visual Basic Developers Resource Centre
http://www.*-*-*.com/
: I have an array of check boxes on a panel which is itself on a
: sheridan tabbed dialogue box.
:
: Depending on the checkbox checked, I want to enable or diable the
: other tabs.
:
: Private Sub Check1_Click(Index As Integer)
:
: If Check1(0).Value = 1 Then
: SSTab1.TabEnabled(1) = True
: Else
: SSTab1.TabEnabled(1) = False
: End If
:
:
: If Check1(1).Value = 1 Then
: SSTab1.TabEnabled(2) = True
: Else
: SSTab1.TabEnabled(2) = False
: End If
:
: End Sub
:
: Problem is, everytime I click one of the check boxes they both
: disappear.
:
: Any suggestions,
:
: Thanks
:
: Jonathan
:
: