Board index » cppbuilder » Font dropdown
Ranganath
CBuilder Developer |
Ranganath
CBuilder Developer |
Font dropdown2007-05-14 08:20:21 PM cppbuilder67 How can I fill a owner-drawn dropdown with all the font names? The font name should be written in that particular font, like in MS Office font dropdown. Is any readymade VSL control available? |
Pete Fraser
CBuilder Developer |
2007-05-14 08:28:33 PM
Re:Font dropdown
JEDI VCL has one of these
HTH Pete "Ranganath" < XXXX@XXXXX.COM >wrote in message Quote
|
Remy Lebeau (TeamB)
CBuilder Developer |
2007-05-15 01:20:38 AM
Re:Font dropdown
"Ranganath" < XXXX@XXXXX.COM >wrote in message
Quote
: TForm(Owner) { ComboBox1->Items->Assign(Screen->Fonts); } void __fastcall TForm1::ComboBox1DrawItem(TWinControl* Control, int Index, const TRect &Rect, TOwnerDrawState State) { AnsiString s = ComboBox1->Items->Strings[Index]; ComboBox1->Canvas->FillRect(Rect); ComboBox1->Canvas->Font->Name = s; ComboBox1->Canvas->TextRect(Rect, Rect.Left, Rect.Top, s); } Gambit {smallsort} |