brgdotnet
asked on
Where to place code in the code behind of my form to hide a control
I have a VB.net windows form with a splitter control on it. I would like to hide one of the panels of the splitter control. From what I have read this needs to be done in the code behind for the form containing the control(I think ?). So my question is where at in the code behind should I place the code to hide the control? Below is an example of the code.
splitContainer1.Panel2.Col lapsed = true;
splitContainer1.Panel2.Hid e();
splitContainer1.Panel2.Col
splitContainer1.Panel2.Hid
ASKER
Hi Chinmay, I need to hide the panel before the form is displayed. I know in asp.net there is the init method. However in web forms, I don't know of such an initialization method. It sounds like you might know, or possibly another expert.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
Open the form and press F7, a file will open with VB.Net code. That is your code behind of a given form.
Now in code behind, on any given control's event you can put your code.
If you can tell me when you want to hide the panel, I will be able to tell you where to put the code.
Regards,
Chinmay.