English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a form with two DataGridView controls, each which has a row of 3 Button controls underneath.

Could someone please help me with making it so that these controls will resize automatically along with the form, without overlapping each other?

I've been experimenting with the Anchor and Dock properties, but so far I haven't been able to make it so that when the form is maximized that the controls do not overlap. How do I solve this problem, do I need to add code for the Resize event to set the controls' dimensions on the fly? Or is there some better way?

2007-02-26 09:49:29 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

There are lots of techniques. My current favorite is to use a table layout panel. You can have as many rows/columns as you want and either set each row/column to a percentage of the available space relative to the others or to a fixed number of pixels. And table layout "cells" can have other table layout panels nested within them. So you can come up with very flexible layouts that dynamically resize as the user resizes the form. The trick to having more than one control in any given table layout panel cell is to put a regular panel control in the cell. then you can add several other controls onto the panel. Make sure to dock the inner panel to "full". This will work much better than trying to dock one as "bottom" and another as "full" since you can end up with unwanted overlaps that will drive you crazy.

2007-02-26 11:46:50 · answer #1 · answered by Gene 3 · 0 0

No no need to add code for the resizing of the data grids. What you need to do is keeping on using the dock properties. Just make sure you dock the two data grids to different places on the page. For example dock one data grid to the fill and one to the footer. That should solve the resizing issue and the overlapping issue. If you have a label control dock it to the same dock as the data grid you want it to match to.

2007-02-26 09:57:27 · answer #2 · answered by yairs2000 3 · 1 0

i certainly in basic terms have been given my first computer. I had with reference to the comparable standards as you. I did quite quite a few examine, and that i picked up a Compaq Presairo CQ50. it extremely is a twin middle processor, so it extremely is rapid as all get out. It comes preloaded with Works and a demo of workplace abode and student, which may well be solid on your case, and you will purchase it top off the laptop. i did no longer, reason i admire Works greater useful, yet it extremely is me. It runs off Vista, and that i've got no longer any clue why human beings are so down on it. The show is a fifteen inch lcd. it extremely is have been given a ton of area. i'm conserving organisation data, video games, and music on mine and it extremely makes a dent in my storage. Plus, in spite of in case you do want one greater Gig of area, you may p.c.. up a card airborne dirt and dirt cheep at Circuit city. I doubt i might want one, even nonetheless it extremely is in basic terms a 2 Gig. extremely nonetheless, you may keep around. call Circuit city and tell them what you like. they are going to supply you ideas that are top for you. once I referred to as I had a fourty 5 minute communicate with between the reps. She made particular I knew precisely what i mandatory and why. you fairly can not bypass incorrect. in spite of in case you do no longer purchase there, you could want a popular theory of what to hunt for. besides, i'm hoping this helps. happy procuring!

2016-11-26 00:52:15 · answer #3 · answered by ? 4 · 0 0

fedest.com, questions and answers