Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove spacing between cells in tablelayoutpanel in Windows form?

I've programmatically created a class, Map, that inherits from the TableLayoutPanel class. The Map class adds Tile objects (children of Panel) that each have a background image. Everything works except that there is a noticeable space between each cell that I would like to remove.

I've looked around, but cannot figure out how to remove the space between the cells in the TableLayoutPanel. What's the easiest way to remove it?

like image 620
Zooey Avatar asked Jul 17 '10 23:07

Zooey


1 Answers

Check that the space isn't caused by the Margin property of your child (Tile) controls being set to some kind of default value - for a number of controls, the default Margin value is 3.

like image 64
robyaw Avatar answered Sep 22 '22 10:09

robyaw