Click here to Skip to main content
16,016,770 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

1 solution

Why Not?
You can do that When Handelling SelectedIndexChanged Event of Tab Strip
Here's Example Code... Reuse in Your Own way...
VB
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...
 
Share this answer
 
Comments
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.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900