tags:

views:

46

answers:

1

I have a TabControl and on each TabPage is a DataGridView control docked to fill its own TabPage. I don't know how, but the first grid has a Location set to 3,3 which gives it a nice margin (while still docking/filling as it should).

The other grids are set to Location = 0,0 and I can't get them to match the first grid. If you set the Location then Dock, the Location is reset to 0,0. If you Dock, then try and set the Location to 3,3 it reverts immediately to 0,0.

+2  A: 

Have you checked the Padding settings on each TabPage and/or the TabControl? This might explain the location being set to 3,3 for the first grid.

Also check the Margin on each DataGridView control.

Richard Bysouth
Yes, that was it. The Padding property on the TabPage. Cheers.
hawbsl
StackOverflow For the Win!
Brad Bruce