: : : : :
: : : : : hi
: : : : :
: : : : : my program has 5 tabpages and i want the font of the page that is selected to change to bold.how can i do this.???
: : : : :
: : : : : kind regards
: : : : : j.
: : : : :
: : : : Private Sub tbcContributionValidationTabs_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbcContributionValidationTabs.SelectedIndexChanged
: : : : Dim a As New System.Windows.Forms.TabPage
: : : : For Each a In tbcContributionValidationTabs.TabPages
Hi
Well what i actually need is to change the heading of the tabs font to bold not the tabs contents please any suggestions would be appreciated.
: : : : a.Font = New System.Drawing.Font("Microsoft Sans Serif", 8, Drawing.FontStyle.Regular)
: : : : Next
: : : : tbcContributionValidationTabs.SelectedTab.Text = New System.Drawing.Font("Microsoft Sans Serif", 8, Drawing.FontStyle.Bold)
: : : : End Sub
: : : :
: : : : this is what i have come up with but it still does not work, i need my tabpages caption to change when selected , i get system.drawing.font cant be converted to string error please HELP!!!
: : : :
: : : ***********************************************
: : : Your error is occuring here:
: : : tbcContributionValidationTabs.SelectedTab.Text = New System.Drawing.Font("Microsoft Sans Serif", 8, Drawing.FontStyle.Bold)
: : :
: : : The .Text property has to be a string. Try resetting the selected page's .FONT property.
: :
: : : How do i reset the selected pages .FONT property though , please
: : help.
: :
: :
: The SelectedTab sets the page as the currently selected tab page. You then reset the font on that tab page like:
: Me.tabpage2.font = New System.Drawing.Font("Microsoft San Serif", 8, Drawing.FontStyle.Bold)
:
: Hope this solves your problem.
: