|
|
Title | Make an expandable dialog with More and Less buttons |
Keywords | dialog, more, less, expandable, detail |
Categories | Software Engineering, Controls |
|
|
When the user clicks the More or Less button, resize the form accordingly. For convenience, use Line controls to mark the dialog's small and large sizes.
|
|
Private Sub cmdMoreOrLess_Click()
If cmdMoreOrLess.Caption = "More" Then
Height = Line2.Y1 + Height - ScaleHeight
cmdMoreOrLess.Caption = "Less"
Else
Height = Line1.Y1 + Height - ScaleHeight
cmdMoreOrLess.Caption = "More"
End If
End Sub
Private Sub Form_Load()
cmdMoreOrLess.Caption = "Less"
cmdMoreOrLess_Click
End Sub
|
|
|
|
|
|