I want to add padding between the TreeView control's contents and its edge in windows form application?
This is referred to as a "margin" ( padding is inside, margin is outside ).
Gets or sets the space between controls.
However, if your TreeView
is docked it will not respect this setting:
Setting the Margin property on a docked control has no effect on the distance of the control from the the edges of its container.
So you would have to place your TreeView
in a Panel
, dock the Panel
and put the margin on the TreeView
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.