3

Is there a way to remove to padding from the Panel within a SplitContainer? So far I tried setting or overwriting the Padding Property with no effort. I don't necessarily want to end up custom drawing everything either.

Screenshot http://xload.dev-ch.com/6ef9241aba201922/screen397.jpg

SwDevMan81
  • 48,814
  • 22
  • 151
  • 184
bytecode77
  • 14,163
  • 30
  • 110
  • 141
  • 1
    Can you show a screenshot of the padding issue and some code of what you have tried? – SwDevMan81 Apr 17 '12 at 12:44
  • It apparently seems to be the TabPage, which causes the padding. Sorry for misleading you. Here is a screenshot: http://xload.dev-ch.com/6ef9241aba201922/screen397.jpg – bytecode77 Apr 17 '12 at 12:51
  • What control have you got inside the TabControl? Is it a RichTextBox? and which padding you want to remove? – Azhar Khorasany Apr 17 '12 at 13:13
  • In this example, it is a `TextBox`, but you can see it on any control. I want the `TextBox` when rendered without border to entirely fit the TabPage without any margins to it. – bytecode77 Apr 17 '12 at 13:37

1 Answers1

1

If you want the TextBox to fill the entire TabPage control, you need to set the TextBox Dock property to Fill, change the Margin property to 0,0,0,0 and then in the TabPage properties, make sure the Padding is set to 0,0,0,0.

SwDevMan81
  • 48,814
  • 22
  • 151
  • 184
  • 1
    I have the docked `TextBox` and set its margin to 0 as well as the margin of the `TabPage`. It still does not work. – bytecode77 Apr 17 '12 at 14:12