Click here to Skip to main content
13,249,813 members (65,854 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I want to develop the TabPage1 in 500 width and 500 Height and TabPage2 in 200 Width and 200 Height. Is this possible to change the TabControl while project is running ?
Posted 23-Jan-13 0:47am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Why Not?
You can do that When Handelling SelectedIndexChanged Event of Tab Strip
Here's Example Code... Reuse in Your Own way...
If TabControl1.SelectedTab.Text = "TabPage1" Then
    TabControl1.Width = 500
    TabControl1.Height = 500
ElseIf TabControl1.SelectedTab.Text = "TabPage2" Then
    TabControl1.Width = 200
    TabControl1.Height = 200
End If

Accpet This Solution if It Help You...
Dishant Khoyani 24-Jan-13 6:16am
yes it had helped me but i am not able to change the size of the tab.
Can u elaborate further ?
Ashok19r91d 24-Jan-13 6:19am
Size of Tab, What it means?
Dishant Khoyani 24-Jan-13 6:23am
size means height and width of the tab.
suppose i am having 1 Tab Control and 3 Tab Pages and i wanted to set different height and width of all the 3 pages of 1 Tab Control.
That means if i am clicking on first Tab Pages its height and width would be 500 500 and for second it would 200 200 and for third it would be 900 900.
Ashok19r91d 24-Jan-13 6:43am
For the same, I've Given Code...
Dishant Khoyani 24-Jan-13 11:21am
I had already applied this code but the fact is i don't know in which function i need to put this code.
Ashok19r91d 26-Jan-13 0:00am
As I Mentioned in Solution
"You can do that When Handelling SelectedIndexChanged Event of Tab Strip"
So Apply this in
Private Sub TabStrip1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As EventArgs) Handles Tabstrip1.SelectedIndexChanged
'Write Code Here...
End Sub

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171114.1 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100