resizable panel
-
Of course you can add controls to your panel. Example:
this.control1.Parent = this.panel1;
(Control1's parent is set to panel1) To resize your panel just set the Size property. Example:this.panel1.Size = new Size([width],[heigth]);
or set the panel's Height and Width property. Good luck! ;) -
Of course you can add controls to your panel. Example:
this.control1.Parent = this.panel1;
(Control1's parent is set to panel1) To resize your panel just set the Size property. Example:this.panel1.Size = new Size([width],[heigth]);
or set the panel's Height and Width property. Good luck! ;) -
Yes. That code he posted gets compiled and executed at runtime. You can change it's size and position all you want in response to events like mouse movement or clicks, etc.
Microsoft MVP, Visual C# My Articles
-
Yes. That code he posted gets compiled and executed at runtime. You can change it's size and position all you want in response to events like mouse movement or clicks, etc.
Microsoft MVP, Visual C# My Articles
-
ok you must forgive me i'm new to csharp i changes the size of my panenl how do i make it where my users can change it when there useing my form because right now they can't change the size of it when i compile it chad
Of course they can't change it unless you provide a way. It's compiled using a certain size and position. If you want the
Panel
to resize in relation to its container, look at theAnchor
andDock
properties. WithAnchor
, if you anchor the control to opposite sides, it will be resized in relation the margin between its borders and that of the corresponding borders of the container control. If you want your users to be able to resize it like you can in the designer, you'll have to provide a mechanism to do so, like handling theMouseDown
to set a flag, theMouseMove
event to resize or move the ocntrol if that flag is set, and theMouseUp
event to reset the flag. When you compile an application, it's runs according to how you program it. Application don't general allow for design-like changes to it. Part of the reason you compile an application is that people can't change it (easily).Microsoft MVP, Visual C# My Articles