Remove spacing between cells in tablelayoutpanel in Windows form?

廉价感情. 提交于 2019-12-23 06:47:19

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/3273669/remove-spacing-between-cells-in-tablelayoutpanel-in-windows-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!