Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
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 22-Jan-13 23:47pm

1 solution

Rate this: bad
good
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...
  Permalink  
Comments
Dishant Khoyani at 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 at 24-Jan-13 6:19am
   
Size of Tab, What it means?
Dishant Khoyani at 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 at 24-Jan-13 6:43am
   
For the same, I've Given Code...
Dishant Khoyani at 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 at 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)



Advertise | Privacy | Mobile
Web01 | 2.8.141015.1 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2014
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