VB.NET

Moderators: seancampbell
Number of threads: 4022
Number of posts: 10035

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Font help!!! PLEASE!!!!! Posted by jade1 on 19 Oct 2004 at 7:02 AM

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.
Report
Re: Font help!!! PLEASE!!!!! Posted by jade1 on 20 Oct 2004 at 2:14 AM
:
: 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
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!!!
Report
Re: Font help!!! PLEASE!!!!! Posted by btseb on 20 Oct 2004 at 7:40 AM
: :
: : 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
: 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.

Report
Re: Font help!!! PLEASE!!!!! Posted by jade1 on 21 Oct 2004 at 10:31 AM
: : :
: : : 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
: : 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.

Report
Re: Font help!!! PLEASE!!!!! Posted by btseb on 21 Oct 2004 at 10:56 AM
: : : :
: : : : 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
: : : 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.

Report
Re: Font help!!! PLEASE!!!!! Posted by jade1 on 22 Oct 2004 at 12:46 AM
: : : : :
: : : : : 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.

:




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.