Login Register


TabControl - Hidden Headers | Structure your Form filter_list
Author
Message
TabControl - Hidden Headers | Structure your Form #1
TabControl - Hide Headers


Hello guys and thank you for checking out this very quick tutorial.
Here you can learn how to hide the Headers in a TabControl.
This is very useful if you create a Builder for a RAT for example, and you like to structure the Settings over multiple pages.
The user don't have to click the little TabControl-Header, you can switch the TabPages easiely by a way you like to (Buttons, ListBox etc).
Lets get started.

1) Create a new Windows Forms Application.

2) Drag a TabControl on you form and add as many pages as you like. In this tutorial I use 3.
When you are done it should look like this:

[Image: fpmoeg6v.png]

3) As you can see, the normal TabControl has those TabHeaders to switch between you pages.
Now give every TabPage a different color or add some controls so we can later see the TabSwitch Wink
If you are done, it should look similar to this:

[Image: 1376489086656.gif]

4)Now for the Coding Part. Doubleclick your form to get in the form load event.
There you paste this code:

[Image: 3s8ak5xd.png]

This will hide the TabControlheaders at runtime, but still show them in the IDE for easy editing/designing.

5) Now we can think how we like to show every TabPage. You can use ListBox Items, TreeView nodes etc. But in this simple tutorial I am going to use Buttons.
So add 3 Buttons below our TabControl

6) In the buttons, just paste this code:

[Image: svn4beij.png]

The TabIndex starts at 0, so the first TabPage has Index 0, The second TabPage has 1 and the Third TabPage has 2.

7) You are done. It should now look like this:

[Image: yeljtvot.gif]

As you can see the TabHeaders are hidden.
I hope you liked this very small tutorial Smile


by Madara-Uchiha

Reply

RE: TabControl - Hidden Headers | Structure your Form #2
Great tutorial, good job man!!
Thanks for sharing it Smile
Don't you mind to look at my user-title?

[Image: w2bzKQY.png?1]


Reply

RE: TabControl - Hidden Headers | Structure your Form #3
Didn't think of doing this, thanks for the share!
[Image: CDUAq9d.png]

Reply

RE: TabControl - Hidden Headers | Structure your Form #4
Nicely structured tutorial man, I've done something like this before.
However, I made a layout in photoshop and had buttons and panels posing as my TabControl. :>

Reply

RE: TabControl - Hidden Headers | Structure your Form #5
(08-14-2013, 08:47 PM)ViolentReality Wrote: Nicely structured tutorial man, I've done something like this before.
However, I made a layout in photoshop and had buttons and panels posing as my TabControl. :>

Exactly what I would have done. I don't exactly see the point of using a TabControl component when you aren't using the main part of it... the tabs. Do you have a need for a TabPages collection or something?

Reply

RE: TabControl - Hidden Headers | Structure your Form #6
I don't really see what's so grear about this except using it for themes.
Good work tho.

- sent from android
[Image: tumblr_m4vms28lYu1qj3ir1.gif]

Reply

RE: TabControl - Hidden Headers | Structure your Form #7
why use a For Each when there is only one item in the Array? besides all of these properties can be set via designer.
[Image: hObYm.gif]

Reply

RE: TabControl - Hidden Headers | Structure your Form #8
Also don't need 3 separate Click handlers for those buttons either. All of that should be handled in 1 method by checking the sender parameters value.

Reply

RE: TabControl - Hidden Headers | Structure your Form #9
So you are just making buttons to switch tabs? I don't really see a point to doing this besides a few choice instances.

Reply

RE: TabControl - Hidden Headers | Structure your Form #10
I think this can be handy for ANY application! Good job on this :O

Reply







Users browsing this thread: 1 Guest(s)