hi i'm vasanth, i'm new to vb.net . i'm using windows application ,i just want to know how to change the tabpage size when click the tab. plz anybody help me.
tab controlhow to change tab size when click the tab
Page 1 of 1
4 Replies - 4569 Views - Last Post: 30 December 2009 - 09:04 AM
Replies To: tab control
#2
Re: tab control
Posted 29 December 2009 - 03:14 AM
Assuming you are using a tab control you can use this simple code
Or click the tab control and go to the properties inspector in the bottom right and click the little lightning bolt icon to go to the events menu. Then find 'selected index changed' and double click in the box to its right. Then type in the change of size you want whenever the tab is changed. alternatively you could check it against it's name like so
Any questions?
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged TabControl1.Width += 5 End Sub
Or click the tab control and go to the properties inspector in the bottom right and click the little lightning bolt icon to go to the events menu. Then find 'selected index changed' and double click in the box to its right. Then type in the change of size you want whenever the tab is changed. alternatively you could check it against it's name like so
Public Class Form1 Private Sub TabControl1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged TabControl1.Width += 5 Select Case TabControl1.Name Case "tab1" 'set size Case "tab2" 'set size End Select End Sub End Class
Any questions?
#3
Re: tab control
Posted 29 December 2009 - 09:57 PM
thank u. but in select case there is case "tab1" wat is this. plz reply.
#4
Re: tab control
Posted 29 December 2009 - 10:36 PM
thanx for ur help. it is working fine now.
instead of Tabcontrol1.name i'm using TabControl1.SelectedIndex.
instead of Tabcontrol1.name i'm using TabControl1.SelectedIndex.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|