Hidding a tab page
-
Hi all, I have read the documentation on MSDN regarding the tabpage control. It states that the tab page within the tabcontrol can not be hidden. According to the MSDN to hide it, one needs to remove it. This is quite hideous! Isn't there another way of doing it? Many thanks in advance Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^
-
Hi all, I have read the documentation on MSDN regarding the tabpage control. It states that the tab page within the tabcontrol can not be hidden. According to the MSDN to hide it, one needs to remove it. This is quite hideous! Isn't there another way of doing it? Many thanks in advance Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^
hi, yes i have also faced this problem. we can not hide tab page in tab control. but i have find a solution by making one custom tab control which has "HideTabPage" property which allow me to hide tab page. but you can also disable all controls on that tabpage, if you don't want to allow users to use controls on that tab page. you ca use this code... For Each ctl As TabPage In myTabControl.TabPages If ctl.Name.Equals(tPageToRemove.Name) Then For Each ctlchild As Control In ctl.Controls ctlchild.Enabled = False Next End If Next by this code you can disable all controls on given tab page. Bye :-D .
Chirag Patel Programmer Analyst India
-
hi, yes i have also faced this problem. we can not hide tab page in tab control. but i have find a solution by making one custom tab control which has "HideTabPage" property which allow me to hide tab page. but you can also disable all controls on that tabpage, if you don't want to allow users to use controls on that tab page. you ca use this code... For Each ctl As TabPage In myTabControl.TabPages If ctl.Name.Equals(tPageToRemove.Name) Then For Each ctlchild As Control In ctl.Controls ctlchild.Enabled = False Next End If Next by this code you can disable all controls on given tab page. Bye :-D .
Chirag Patel Programmer Analyst India
Hi, Chirag, Thanks for the reply. Regarding your comment:
JustChiragPatel wrote:
but i have find a solution by making one custom tab control which has "HideTabPage" property which allow me to hide tab page.
Could you perhaps give an example of this? Cause disabling all of the components on the tabpage is not what I'm trying to do. Many thanks in advance Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^
-
Hi, Chirag, Thanks for the reply. Regarding your comment:
JustChiragPatel wrote:
but i have find a solution by making one custom tab control which has "HideTabPage" property which allow me to hide tab page.
Could you perhaps give an example of this? Cause disabling all of the components on the tabpage is not what I'm trying to do. Many thanks in advance Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^
hi, ok, i think building custom tab control will solve your problem. i can give you logic for custom control. logic of "HideTabPage" method is, take array of tabpages control which are in custome tabcontrol. and remove that tabpage from tabcontrol which you want to hide. and when you want to show/display that removed tabpage then add taht tab page from tabpages array into tabpage control. you can also modify this logic according to your requirement. you can make some browseable properties also, so you can hide/show tabpages by setting property values. Bye :-D.
Chirag Patel Programmer Analyst India
-
Hi all, I have read the documentation on MSDN regarding the tabpage control. It states that the tab page within the tabcontrol can not be hidden. According to the MSDN to hide it, one needs to remove it. This is quite hideous! Isn't there another way of doing it? Many thanks in advance Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^
Programm3r wrote:
This is quite hideous!
I don't think so. Tab control is built for showing multiple tabs. Why you need to hide one tab page ? Are you looking for wizard kind of stuff ? Alternatively you can disable the controls in one tab page by casting the tab page into control and setting
Enabled=false
.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
Programm3r wrote:
This is quite hideous!
I don't think so. Tab control is built for showing multiple tabs. Why you need to hide one tab page ? Are you looking for wizard kind of stuff ? Alternatively you can disable the controls in one tab page by casting the tab page into control and setting
Enabled=false
.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
Thank you for the reply and information Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^
-
Hi all, I have read the documentation on MSDN regarding the tabpage control. It states that the tab page within the tabcontrol can not be hidden. According to the MSDN to hide it, one needs to remove it. This is quite hideous! Isn't there another way of doing it? Many thanks in advance Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^
i have developed a program where a close button on every tabpage, i used
Control.Remove()
to remove tabpage from tabcontrol when close button is pressed, and add that tabpage when user want to add, so i dont think its hideousTVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y -------------------------------------------------------- 128 bit encrypted signature, crack if you can