1

I have looked at RRUZ's awesome VCL Style Utils, and in the VCL Styles source, and I can't see any way to change the nonclient area caption font face (name), or color, or size, at runtime.

Is there a way? Or do I need to subclass TNCControls and override some paint code?

Update: I can change the font by modifying the style in the bitmap style designer, but that only lets you set the font once and never change it at runtime.

Warren P
  • 65,725
  • 40
  • 181
  • 316
  • 2
    You can change this in the "Bitmap Style Designer". As far as changing it from within your Delphi code, I'm not sure. Looking now, I can see in `Objects > Form > Image > Title > Caption` the properties has a `Font` you can change. – Jerry Dodge Sep 02 '16 at 18:37
  • that would let me modify the style itself to always use a different one, but I'd like to actually change the color and the font face at runtime. – Warren P Sep 02 '16 at 18:50
  • You can change a style at run time. There are quite a few tutorials out there. – Dsm Sep 02 '16 at 20:31
  • Warren, have you managed to change the form caption font at runtime somehow? @Dsm could you link some of them? I was searching quite a lot but haven't found one. Thank you! – Victoria Dec 08 '17 at 19:32
  • No or I would have answered my own question. I think that the most sensible option would be to create a custom style that has the fonts I want, for a one time font change. And if not that, then some subclassing of VCL classes would be necessary. – Warren P Dec 08 '17 at 23:00
  • And by the way Victoria, if you change a style at runtime, be sure the style is not used by anything else other than that form caption, or you'll be doing things with huge side effects. – Warren P Dec 11 '17 at 20:33

0 Answers0