0
votes

I have a TabControl. I add tab pages at runtime. On top of tabPage i add User Control at runtime.

Inside user Control i have richtextbox.

So its like TabControl-->TabPage--->UserControl-->RichTextBox & other controls. I want my richtextbox to completely fill the space when i maximize. I tried Dock property and panel but no luck.

Any help is appreciated. Thanks.

1
What did you try? What happened? What exactly do you want? - SLaks
updated my previous post. pls refer. - bayyinah

1 Answers

1
votes

Not very clear what is your real problem, but just by guessing:

To me it seems that Dock.Fill can not fail in this condition. What can happen, IMHO, is that TabControl doesn't resize, so its children (richtextbox too) do not change their client area size. In other words

  • Set Dock.Fill property on your RichText box
  • Check out TabControl's Dock, or Anchor properties.

Hope this helps.