Chitkaran Singh

Chitkaran Singh

  • NA
  • 461
  • 313.9k

How to add fonts in combobox

Dec 2 2007 6:57 AM

How can i all the fonts in the combobox when the program executes....    

I want all the fonts listed in the Fonts folder of the windows...

 

Please help me...

 

 


Answers (3)

0
Scott Lysle

Scott Lysle

  • 0
  • 25.7k
  • 18.7m
Dec 2 2007 8:22 AM

Give this a shot:

FontFamily[] fontFam = System.Drawing.FontFamily.Families;
 
foreach (FontFamily ff in fontFam)
     comboBox1.Items.Add(ff.Name);
0
Scott Lysle

Scott Lysle

  • 0
  • 25.7k
  • 18.7m
Dec 2 2007 8:22 AM

Give this a shot:

FontFamily[] fontFam = System.Drawing.FontFamily.Families;
 
foreach (FontFamily ff in fontFam)
     comboBox1.Items.Add(ff.Name);
0
Scott Lysle

Scott Lysle

  • 0
  • 25.7k
  • 18.7m
Dec 2 2007 8:22 AM

Give this a shot:

FontFamily[] fontFam = System.Drawing.FontFamily.Families;
 
foreach (FontFamily ff in fontFam)
     comboBox1.Items.Add(ff.Name);