Font help!!! PLEASE!!!!!


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.

Comments

  • :
    : 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!!!
  • : :
    : : 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!!!
    :
    [red]***********************************************
    Your error is occuring here:
    [blue]tbcContributionValidationTabs.SelectedTab.Text = New System.Drawing.Font("Microsoft Sans Serif", 8, Drawing.FontStyle.Bold)[/blue]

    The .Text property has to be a string. Try resetting the selected page's .FONT property.[/red]
  • : : :
    : : : 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!!!
    : :
    : [red]***********************************************
    : Your error is occuring here:
    : [blue]tbcContributionValidationTabs.SelectedTab.Text = New System.Drawing.Font("Microsoft Sans Serif", 8, Drawing.FontStyle.Bold)[/blue]
    :
    : The .Text property has to be a string. Try resetting the selected page's .FONT property.[/red]

    : How do i reset the selected pages .FONT property though , please
    help.

  • : : : :
    : : : : 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!!!
    : : :
    : : [red]***********************************************
    : : Your error is occuring here:
    : : [blue]tbcContributionValidationTabs.SelectedTab.Text = New System.Drawing.Font("Microsoft Sans Serif", 8, Drawing.FontStyle.Bold)[/blue]
    : :
    : : The .Text property has to be a string. Try resetting the selected page's .FONT property.[/red]
    :
    : : How do i reset the selected pages .FONT property though , please
    : help.
    :
    :
    [blue] The SelectedTab sets the page as the currently selected tab page. You then reset the font on that tab page like:
    [red] Me.tabpage2.font = New System.Drawing.Font("Microsoft San Serif", 8, Drawing.FontStyle.Bold)[/red]

    Hope this solves your problem. [/blue]
  • : : : : :
    : : : : : 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!!!
    : : : :
    : : : [red]***********************************************
    : : : Your error is occuring here:
    : : : [blue]tbcContributionValidationTabs.SelectedTab.Text = New System.Drawing.Font("Microsoft Sans Serif", 8, Drawing.FontStyle.Bold)[/blue]
    : : :
    : : : The .Text property has to be a string. Try resetting the selected page's .FONT property.[/red]
    : :
    : : : How do i reset the selected pages .FONT property though , please
    : : help.
    : :
    : :
    : [blue] The SelectedTab sets the page as the currently selected tab page. You then reset the font on that tab page like:
    : [red] Me.tabpage2.font = New System.Drawing.Font("Microsoft San Serif", 8, Drawing.FontStyle.Bold)[/red]
    :
    : Hope this solves your problem. [/blue]
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories