QWERTYtech

I have a Panel im my program and I was wondering how i can make it hideable. I want to have the small triangle in the dividerbar so that when u click on it, it auto hides.

QWERTYtech



Re: Visual Basic General Hideable Panel

Frank Carr

MyPanelControl.Visible = False to hide it, = True to show it. Just put the code to toggle it in your button's click event.




Re: Visual Basic General Hideable Panel

cybertaz69

I used radio button but you could do the same thing using button with image (Small Triangle)....

Code Snippet

Private sub Radiobutton1_Click(byval.......................... the click event

me.panel1.visable = false

me.radiobutton2.visable = true 'Made this visable so the user can click on it to make it reappear... in your case just change the image to show the pannel holds some thing...

end sub

Private sub radiobutton2_click( ..................... other click event

me.panel1.visabe = true

me.radiobutton2.visable = fales

end sub






Re: Visual Basic General Hideable Panel

QWERTYtech

How could I go about adding an "image" the right border of my panel



Re: Visual Basic General Hideable Panel

cybertaz69

Easyest way is to add a button with image and no text..... To make it look Pro add a groupbox inside the panel with the button out side the groupbox...






Re: Visual Basic General Hideable Panel

SJWhiteley

An alternative that I've used is to use a TableLayout control: you can 'hide' a panel by changing it's width (or height) of the row or column that it's in to zero. All the other rows/columns as appropriate will resize.