public class FontType
{
...
public String Name { get { return _name; } }
public String DisplayName { get { return _displayName; } }
public Font UseFont { get { return _font; } }
}
bindFontTypes.DataSource = availableFonts;
comboFontType.DataSource = bindFontTypes;
comboFontType.ValueMember = "Key";
comboFontType.DisplayMember = ...???;
여기에서 bindFontTypes
은 BindingSource입니다. availableFonts
은 키가 문자열 인 Hashtable이며 값은 FontType의 개체입니다. comboFontType.DisplayMember
에 대해 개체의 .DisplayName 속성을 사용하고 싶습니다. 어떻게 지정해야합니까? 가능한가?C# : 해시 테이블을 콤보 상자에 바인딩하는 질문
그것은 고맙습니다! – flamey