VB.Net Hide Tabpage

前端 未结 3 1232
小蘑菇
小蘑菇 2021-01-20 18:39

Ive seen some discussion on here about how to hide tabs in a tabcontrol but they all seem to be in C or some variant. I havent seen one for vb.net (i cant do C)

What

3条回答
  •  广开言路
    2021-01-20 19:21

    You just add and remove TabPages from the TabControl through the TabPages collection:

    TabControl1.TabPages.Add(myTabPage)
    

    and to remove it:

    TabControl1.TabPages.Remove(myTabPage)
    

    Note: Removing a TabPage does not dispose it, it just removes it from the TabPage collection.

提交回复
热议问题