TFontStyle (C++)

From RAD Studio Code Examples
Jump to: navigation, search


This example demonstrates how to set and clear font styles. This example requires a button and a label that has text with some styles set.


void __fastcall TForm1::Button1Click(TObject *Sender)
   Label1->Font->Style = TFontStyles() << fsBold << fsUnderline;
This example demonstrates how to clear 
any Styles that were previously set.
void __fastcall TForm1::Button2Click(TObject *Sender)
   Label1->Font->Style = TFontStyles();