简体   繁体   中英

Dynamically add usercontrol to tab panel at center

我正在动态地将tabcontrol添加到选项卡面板中如何将其添加到关于选项卡面板的中心位置?

The Location and Anchor properties of the control should allow you to position the control dynamically.

        this.userControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                    | System.Windows.Forms.AnchorStyles.Left)
                    | System.Windows.Forms.AnchorStyles.Right)));
        this.userControl.Location = new System.Drawing.Point(108, 85);

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM