 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ranganath Guest
|
Posted: Mon May 14, 2007 5:20 pm Post subject: Font dropdown |
|
|
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? |
|
| Back to top |
|
 |
Pete Fraser Guest
|
Posted: Mon May 14, 2007 5:28 pm Post subject: Re: Font dropdown |
|
|
JEDI VCL has one of these
HTH Pete
"Ranganath" <ranganath_vasudeva (AT) yahoo (DOT) com> wrote in message
news:46485405$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
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? |
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Mon May 14, 2007 10:20 pm Post subject: Re: Font dropdown |
|
|
"Ranganath" <ranganath_vasudeva (AT) yahoo (DOT) com> wrote in message
news:46485405$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
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?
|
You can use a standard owner-drawn TComboBox for that. For example:
__fastcall TForm1::TForm1(TComponent *Owner)
: 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 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|