setting font at runtime

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

    #1

    setting font at runtime

    how do you set the font for a label control in VB.NET/ASP.NET?
    im trying:
    label1.font = new system.drawing. font ("Arial",10)
    as stated in the sample code, but compiler says "property font is
    read-only".


  • Natty Gur

    #2
    Re: setting font at runtime

    use the attributes :

    me.Label1.Style["FONT-FAMILY"] = "Wingdings" ;

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!

    Comment

    Working...