BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Font dropdown

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Ranganath
Guest





PostPosted: Mon May 14, 2007 5:20 pm    Post subject: Font dropdown Reply with 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
Pete Fraser
Guest





PostPosted: Mon May 14, 2007 5:28 pm    Post subject: Re: Font dropdown Reply with quote



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





PostPosted: Mon May 14, 2007 10:20 pm    Post subject: Re: Font dropdown Reply with quote



"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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.