This is really frustrating me, I know it's something stupid that I missed. I have a combo box that loads all available fonts when the app starts up. When the user selects a font from the combo box, it should change the label to the font they selected. Here's what happens upon Initialization:

// load all available fonts into the combo box
            FontFamily[] ffArray = FontFamily.Families;
            foreach (FontFamily ff in ffArray)
            {
                if (ff.IsStyleAvailable(FontStyle.Regular))
                {
                    comboBox1.Items.Add(ff.Name);
                }
            }

And here's where I'm missing something; the combobox selected index changed event:

FontFamily[] ffArray = FontFamily.Families;
            foreach (comboBox1.SelectedIndex font in ffArray)
            {
                if (font.IsStyleAvailable(FontStyle.Regular))
                {
                    label1.Font = new Font(font, 14);
                }                
            }

Instead of comboBox1.SelectedIndex, try using comboBox1.SelectedItem

I have already tried that.

Just use the following in your combo box selected index changed event handler

string font = comboBox1.SelectedItem.ToString();
            label3.Font = new System.Drawing.Font(font, 14);

I just tried that and it works.

Just use the following in your combo box selected index changed event handler

string font = comboBox1.SelectedItem.ToString();
            label3.Font = new System.Drawing.Font(font, 14);

I just tried that and it works.

Ahh simple and effective. Thanks :)

This question has already been answered. Start a new discussion instead.