Tech Off Thread

1 post

Incrementing Font sizes

Back to Forum: Tech Off
  • User profile image
    asqui

    So it seems that System.Drawing.Font is immutable. What is a nice way to increment the font size of a given control?

    You can initialise a new Font object from an existing one and specify a different FontStyle for the new object, but that's all. And there are no methods that return a new font object with one of the properties updated to a new value. (eg. myFont.NewSize(10) returns a handy copy of myFont with the size changed to 10)

    What am I missing? There must be some alternative to manually specifying all the properties...


    Thanks in advance,
    Dani

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.