CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2000
    Location
    New Jersey
    Posts
    14

    Displaying and Selecting Fonts

    Here is my problem:

    I need to display a list of fonts (I do not know the size of the list ahead of time) and I need people to be able to select an item in the list. Obviously I can do the above with a simple list box, but I have left the most important part out.

    I need to display each font in its 'actual font' (ie Arial in Arial, Helvetica in Helvetica, ...)

    Does anyone have any ideas? I am desperate and feeling stupid. Thanks,

    Chris


  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Displaying and Selecting Fonts

    You can either :

    1. Use the CommonDialog control that comes with VB to popup the standard 'choose-font' dialog

    or

    2. Go to http://vbaccelerator.com and take a look at their owner-drawn combo control. There's some excellent examples that demonstrate how to show all the system fonts in a combo (just like in Word / FrontPage / other M$ programs).


    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

  3. #3
    Join Date
    Jan 2000
    Location
    New Jersey
    Posts
    14

    Re: Displaying and Selecting Fonts

    Clint,

    First, thanks for the speedy reply.

    I probably should have been more specific. I am not trying to create a font picker (ala microsoft), but rather a list of fonts that I can programmatically control their display size, color, and order.

    Chris


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured