Resizing Panel in SplitContainer
-
Hi I have SplitContainer with two panels where in one panel there are many controls. During Resize event I would like all controls in the panel be resized too. Is there any way to do that automatically (any property) or should I do it by counting the size of each control depending on size of panel? (for me not a good solution). Thanks for help Ela
-
Hi I have SplitContainer with two panels where in one panel there are many controls. During Resize event I would like all controls in the panel be resized too. Is there any way to do that automatically (any property) or should I do it by counting the size of each control depending on size of panel? (for me not a good solution). Thanks for help Ela
Have you looked at the Anchor property of the controls? This allows controls to be resized automatically.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Goof around music jam with my brothers (with video) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
Hi I have SplitContainer with two panels where in one panel there are many controls. During Resize event I would like all controls in the panel be resized too. Is there any way to do that automatically (any property) or should I do it by counting the size of each control depending on size of panel? (for me not a good solution). Thanks for help Ela
You could try to do an Anchor left, top, right. However all controls in your panel must be in a single collumn for this to work correctly. What you may have to do if Anchoring does not help is to subscribe to the Resize event on the panel. Then based on the size of Panel1 or Panel2 (whichever side your controls are in) you set the new sizes of your controls. I found one or two situations where Anchoring just did not do it for all of my controls.
-
Hi I have SplitContainer with two panels where in one panel there are many controls. During Resize event I would like all controls in the panel be resized too. Is there any way to do that automatically (any property) or should I do it by counting the size of each control depending on size of panel? (for me not a good solution). Thanks for help Ela