Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Examples? LMDLabeledFontListBox or ElFontListBox

I'd like to know where the examples are for these components.  I am sure every component has an example somewhere. 

I'd like to change the font in my app as I am scrolling through these fonts. I don't want to use a FontDialog because you need to actually select a single font, then click APPLY to see the changes.  So the LMDLabeledFontListBox looks perfect, but how do I get the font name of the selected font?

I tried
   LabelNewFont->Font->Name = ElFontListBox->Font->Name;
   LabelNewFont->Font->Name = ElFontListBox->FontName;

Thanks for the help!
Doug

Comments

  • 3 Comments sorted by Votes Date Added
  • I got the LMDLabeledFontListBox to work

    LabelNewFont->Font->Name = LMDLabeledFontListBox->Items->Strings[LMDLabeledFontListBox->ItemIndex];

    But would still like to see the examples, especially for the ElFontListBox

    Thanks!
  • Not sure what problem you had, but
    label1.Font.Name := fontlistbox.FontName; 
    e.g. in OnClick event works fine for me 
    (same as LabelNewFont->Font->Name = ElFontListBox->FontName;). 
    Tested with Delphi/C++Builder XE2 and ElPack 2014.


Sign In or Register to comment.