Font Bold

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lou

    Font Bold

    Why is font bold a read only property.
    I create a new label control and want to set the font properties.
    How do I set the font properties of a newly created label control?

    lbl = New Label

    lbl.Font.Bold=T rue


  • Herfried K. Wagner [MVP]

    #2
    Re: Font Bold

    "Lou" <lou.garvin@com cast.netschrieb :
    Why is font bold a read only property.
    I create a new label control and want to set the font properties.
    How do I set the font properties of a newly created label control?
    >
    lbl = New Label
    >
    lbl.Font.Bold=T rue
    \\\
    lbl.Font = New Font(lbl.Font, FontStyle.Bold)
    ///

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

    Comment

    • Samuel

      #3
      Re: Font Bold

      I don't know why

      It is something we got used to and the way that I know of is to set the font
      to a new font like: Label1.Font= New Font(...)

      hth,
      Sam


      "Lou" <lou.garvin@com cast.netwrote in message
      news:umdmrfWTHH A.4872@TK2MSFTN GP03.phx.gbl...
      Why is font bold a read only property.
      I create a new label control and want to set the font properties.
      How do I set the font properties of a newly created label control?
      >
      lbl = New Label
      >
      lbl.Font.Bold=T rue
      >
      >

      Comment

      • Lou

        #4
        Re: Font Bold

        Way too easy!
        thanks.

        "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atwrot e in message
        news:%235RCFFXT HHA.1016@TK2MSF TNGP04.phx.gbl. ..
        "Lou" <lou.garvin@com cast.netschrieb :
        >Why is font bold a read only property.
        >I create a new label control and want to set the font properties.
        >How do I set the font properties of a newly created label control?
        >>
        >lbl = New Label
        >>
        >lbl.Font.Bold= True
        >
        \\\
        lbl.Font = New Font(lbl.Font, FontStyle.Bold)
        ///
        >
        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

        Comment

        Working...