Anchor, Dock, FlowLayoutPanel, Panel, When to use and how!?
-
Hi everyone, I am at wits end. I think I've read every article on CP and searched for them on the web and I just can't figure this out. I have built an application that has a lot of group boxes and controls within those group boxes on the form. I designed it with a screen resolution of 1280x1024 in mind because that is what all of us use. The controls fit just right when maximized. Now, I get this one user who is still using 1024x768 and I'm hosed! There are some group boxes and some comboboxes/textboxes that I can resize and make smaller (when they entered data, it would scroll out of the box, but no big deal). So now I have to re do this application to make it so that it resizes certain controls in certain group boxes when the form size is changed. (ie, they resize the control, I need one of the group boxes to get bigger, and a control or two within that groupbox to get bigger too) I have tried playing with DOCK and ANCHOR on end. I can't get it to work right. Setting an anchor property of TOP,LEFT,RIGHT,BOTTOM resizes the group box that I want, but the problem is that when it is resized too much, that group box runs into the next group box below it. I just cannot figure out how to use panels, flowlayoutpanels, dock and anchor properties to only resize some controls but do not interfere with other controls (there are buttons / textboxes next to each other, and above and below each other, each time I've tried one of the buttons will resize itself and overrun the next) I can't get them all to just work nicely with one another! I went to the store and bought two books and read for three hours today before posting this. I'm super peaved at myself for not being able to figure this one out. Any help, a link or anything would be seriously appreciated! TIA
-
Hi everyone, I am at wits end. I think I've read every article on CP and searched for them on the web and I just can't figure this out. I have built an application that has a lot of group boxes and controls within those group boxes on the form. I designed it with a screen resolution of 1280x1024 in mind because that is what all of us use. The controls fit just right when maximized. Now, I get this one user who is still using 1024x768 and I'm hosed! There are some group boxes and some comboboxes/textboxes that I can resize and make smaller (when they entered data, it would scroll out of the box, but no big deal). So now I have to re do this application to make it so that it resizes certain controls in certain group boxes when the form size is changed. (ie, they resize the control, I need one of the group boxes to get bigger, and a control or two within that groupbox to get bigger too) I have tried playing with DOCK and ANCHOR on end. I can't get it to work right. Setting an anchor property of TOP,LEFT,RIGHT,BOTTOM resizes the group box that I want, but the problem is that when it is resized too much, that group box runs into the next group box below it. I just cannot figure out how to use panels, flowlayoutpanels, dock and anchor properties to only resize some controls but do not interfere with other controls (there are buttons / textboxes next to each other, and above and below each other, each time I've tried one of the buttons will resize itself and overrun the next) I can't get them all to just work nicely with one another! I went to the store and bought two books and read for three hours today before posting this. I'm super peaved at myself for not being able to figure this one out. Any help, a link or anything would be seriously appreciated! TIA
It's really difficult to visualize by your post the problem you're having. Can you post the code for the form or show a screenshot of the problem? Most likely if you need resizing but don't want your controls to overlap other controls in the same parent via the resizing, you'll need a flow layout panel. But I'd really need to see what you need visually before answering your problem.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango