开发者

How to fill a user control?

开发者 https://www.devze.com 2023-03-20 12:00 出处:网络
How can I stretch a user control? I have a userControl it\'s highlighted in blue. Is\'s a TabControl. 开发者_运维问答How do I strech it to fill the entire parent.

How can I stretch a user control?

I have a userControl it's highlighted in blue. Is's a TabControl.

开发者_运维问答How do I strech it to fill the entire parent.

How to fill a user control?

And how to make ComboBox stretched if GroupBox changes

How to fill a user control?

Update Please provide the code with this structure: - Window -> panel -> MyuserContorl - MyUserControl -> panel -> tabControl

To all stretched


You can anchor your user control by setting the Anchor.

Here's a useful article

Edit:

In your user control

     this.tabControl.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom)
         | AnchorStyles.Left) | AnchorStyles.Right)));

You may also need to Dock or Anchor the panel inside your user control.

In your window

     this.userControl.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom)
         | AnchorStyles.Left) | AnchorStyles.Right)));

Again you may need to Dock or Anchor the panel inside your form.

0

精彩评论

暂无评论...
验证码 换一张
取 消