Change Font Weight at run time

Posted by: kim on 25 September 2020, 1:16 am EST

    • Post Options:
    • Link

    Posted 25 September 2020, 1:16 am EST

    I am using AR11 for WINFORMS.

    I am trying to Change the Font Weight at run time in the Detail_Format event but I can’t see to figure out how.

    lbl.Font.Bold = true does not work

    lbl.Font.Style = FontStyle.Bold does not work

    I get a “Property or indexor … is read only”

    How is this achieved?

    TIA

  • Posted 25 September 2020, 4:24 am EST

    Hello,

    Please use the following lines of code:

    this.Label1.Font = new System.Drawing.Font(this.Label1.Font.FontFamily, this.Label1.Font.Size, System.Drawing.FontStyle.Bold);

    Thanks,

    Mohit

  • Posted 25 September 2020, 11:54 am EST

    Thanks.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels