Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TFont



Permlink Replies: 3 - Last Post: Feb 26, 2016 3:13 AM Last Post By: Dan Ambrose
Dan Ambrose

Posts: 87
Registered: 12/11/03
TFont
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 25, 2016 10:27 AM
Greetings from St Louis, Missouri USA - I'm using C++ Builder and learning the VCL...

TFont - Is there a generic TFont modal Dialog box that can used to set the referenced TFont ? If no then what is the best way to make one without spending a day on it?

Seems like such a common thing .. I was hoping the VCL had one just like the object inspector but at run time. That you can trigger.

Dan
St Louis, MO
Antonio Estevez

Posts: 665
Registered: 4/12/00
Re: TFont
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 25, 2016 10:54 AM   in response to: Dan Ambrose in response to: Dan Ambrose
El 25/02/2016 a las 19:27, Dan Ambrose escribió:
Greetings from St Louis, Missouri USA - I'm using C++ Builder and learning the VCL...

TFont - Is there a generic TFont modal Dialog box that can used to set the referenced TFont ? If no then what is the best way to make one without spending a day on it?

Seems like such a common thing .. I was hoping the VCL had one just like the object inspector but at run time. That you can trigger.

Dan
St Louis, MO

There is a TFontDialog component in the "Dialogs" palette.

    TFont *Font= Button1->Font;
 
    FontDialog1->Font= Font;
    if (FontDialog1->Execute())
       Font->Assign(FontDialog1->Font);
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: TFont
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 25, 2016 11:12 AM   in response to: Dan Ambrose in response to: Dan Ambrose
Dan wrote:

TFont - Is there a generic TFont modal Dialog box

TFontDialog
http://docwiki.embarcadero.com/Libraries/en/Vcl.Dialogs.TFontDialog

that can used to set the referenced TFont ?

You would Assign() your desired TFont to the TFontDialog.Font property, then
call TFontDialog.Execute(), and if it returns true then Assign() the updated
TFontDialog.Font back to your desired TFont.

--
Remy Lebeau (TeamB)
Dan Ambrose

Posts: 87
Registered: 12/11/03
Re: TFont
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 26, 2016 3:13 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
That worked very well ... T H A N K Y O U ! ! !
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02