我有一个ComboBox
包含Unicode
个符号,该字体设置为支持Unicode的字体,并且显示效果很好。但是DropDown部分似乎使用了无法显示这些Unicode symbols
的标准字体。是否可以在属性中更改此设置,还是必须创建自定义的ComboBox
控件?
编辑:
我的代码:
public class MainWindow : Form {
...
public BindingList<Sound> Sounds { get; set; } = new BindingList<Sound>();
public MainWindow() {
InitializeComponent();
this.comboBox.DataSource = this.Sounds;
}
...
}
public class Sound {
public char Symbol { get; private set; }
public Sound(char symbol) {
this.Symbol = symbol;
}
public override int GetHashCode() {
return this.Symbol.GetHashCode();
}
public override bool Equals(object obj) {
if(obj is Sound) {
return this.Symbol == ((Sound)obj).Symbol;
}
return base.Equals(obj);
}
public override string ToString() {
return this.Symbol.ToString();
}
public void Play() {
...
}
}