Tech Off Post

Single Post Permalink

View Thread: Incrementing Font sizes
  • User profile image

    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,