Fill ComboBox with List of available Fonts

后端 未结 7 2264
無奈伤痛
無奈伤痛 2020-12-10 00:29

How can I fill a combo-box with a list of all the available fonts in the system?

7条回答
  •  悲&欢浪女
    2020-12-10 00:56

    Please keep in mind all will come from "System.Drawing"

    foreach (System.Drawing.FontFamily font in System.Drawing.FontFamily.Families)
    {
        comboBox1.Items.Add(font.Name);
    }
    

提交回复
热议问题