C # TabControl Hide tag header (TabControl hide head)

Source: Internet
Author: User

Tag: Deb object initial OID har BSP tar color void

TabControl control, sometimes need to dynamically display one or more tabs, if you just display a tab, do not want to display the label header, it is possible to hide the needs of the head.

The following code can be implemented

public Form1 () {InitializeComponent ();            _tabcontrolitemsize = tabcontrol1.itemsize;            _tabcontrolappearance = tabcontrol1.appearance;        _tabsizemode = Tabcontrol1.sizemode;            private void showbutton_click  (object sender, EventArgs e) {            Tabcontrol1.itemsize = _tabcontrolitemsize;            Tabcontrol1.appearance = _tabcontrolappearance;        Tabcontrol1.sizemode = _tabsizemode;            private void hidebutton_click  (object sender, EventArgs e) {            Tabcontrol1.itemsize = new Size (0, 1);            Tabcontrol1.appearance = tabappearance.flatbuttons;        Tabcontrol1.sizemode = tabsizemode.fixed;        } private Size _tabcontrolitemsize;        Private Tabappearance _tabcontrolappearance; Private Tabsizemode _tabsizemode;//If this value is not set, the effect is another effect 

C # TabControl Hide tag header (TabControl hide head)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.