isda-don
asked on
Hide part of form on load
Hi Experts,
I'm sure one of you can tell me a better way to accomplish what I need, but here is what I am trying to do. Attached is a screen shot of the form I am currently working with. What I'm trying to do is hide the bottom half of the form. As you can see from the screen shot, I have my "Bank Information" and "Name On Check" fields inside a panel. I only want those fields to show if the user clicks on the "Create New Profile" button. I can accomplish this by hiding the panel when the form loads, but I don't want a big blank empty space for the bottom half of my window. I can't find anything on how to hide part of a form, so I'm thinking there is a better way.
Thanks,
Dan
Doc3.doc
I'm sure one of you can tell me a better way to accomplish what I need, but here is what I am trying to do. Attached is a screen shot of the form I am currently working with. What I'm trying to do is hide the bottom half of the form. As you can see from the screen shot, I have my "Bank Information" and "Name On Check" fields inside a panel. I only want those fields to show if the user clicks on the "Create New Profile" button. I can accomplish this by hiding the panel when the form loads, but I don't want a big blank empty space for the bottom half of my window. I can't find anything on how to hide part of a form, so I'm thinking there is a better way.
Thanks,
Dan
Doc3.doc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
this.Size = new Size(this.Size.Width, this.Seize.Height + 500); // <-- You need to experiment with what value works best for your form
Of course, you need to use some kind of variable to track whether or not the form is currently "expanded" so you don't try to expand it more. To collapse the form just do the opposite and subtract the right amount...