Fonts on TabPages?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a tabControl with three tab pages that is contained in a windows form. Here is my event handler for the selectedIndexChanged event

Private Sub myTabs_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles myTabs.SelectedIndexChange
'bolds the caption on the selected ta
Dim t As Windows.Forms.TabPag
For Each t In Me.myTabs.TabPage
t.Font = regularFon
Nex
myTabs.SelectedTab.font = boldFon
End Su

I'm *trying* to make the caption on the selected tab bold to make it more clear to the user which tab he's on. However, this code is not working. The only way I've been able to change the font on the tab pages is by setting the font property on the tabControl. Any help would be greatly appreciated

Rob Reaga
(e-mail address removed)
(Remove nospam to get my address)
 
see
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20883447.html

--

HTH

Éric Moreau, MCSD
Conseiller Principal / Senior Consultant
Concept S2i inc.(www.s2i.com)
Rob Reagan said:
I have a tabControl with three tab pages that is contained in a windows
form. Here is my event handler for the selectedIndexChanged event.
Private Sub myTabs_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles myTabs.SelectedIndexChanged
'bolds the caption on the selected tab
Dim t As Windows.Forms.TabPage
For Each t In Me.myTabs.TabPages
t.Font = regularFont
Next
myTabs.SelectedTab.font = boldFont
End Sub

I'm *trying* to make the caption on the selected tab bold to make it more
clear to the user which tab he's on. However, this code is not working. The
only way I've been able to change the font on the tab pages is by setting
the font property on the tabControl. Any help would be greatly appreciated.
 
Back
Top