Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Togglebuttons

Status
Not open for further replies.

ixian

Programmer
Jul 13, 2001
128
US
Hello,

I wish to know how to use a toggle button to close(hide) a portion of the form on the 1st click resize the text box in one function. On the other hand to do the 2nd click to re open the area that was closed and resize everything to normal.

Aaron
 
The easiest way is to use a frame to make everything within it visible/invisible.

Place the following code in the click event of the commandbutton:

If Frame1.Visible Then
Frame1.Visible = False
Text1.Width = Text1.Width * 2 'double the width
Text1.Height = Text1.Height * 2 'double the height
Else
Frame1.Visible = True
Text1.Width = Text1.Width \ 2 'reset the width
Text1.Height = Text1.Height \ 2 'reset the height
End If


Size of the textbox is of course just a sample.

Herman :-Q
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top