1
나는 이미 C# 코드를 사용하여 콤보 상자를 채우는 방법을 알고 있지만 디자이너/속성을 사용하여 디자인 타임에 콤보 상자를 채우는 방법이 있습니까?C# : 디자인 타임에 콤보 상자 채우기
나는 이미 C# 코드를 사용하여 콤보 상자를 채우는 방법을 알고 있지만 디자이너/속성을 사용하여 디자인 타임에 콤보 상자를 채우는 방법이 있습니까?C# : 디자인 타임에 콤보 상자 채우기
이 항목 속성을 찾을 수 콤보 상자 또는를 눌러 F4의 속성 탐색기로 이동합니다. 아래 이미지를 참조하십시오.
희망이 있습니다.
는 Dans Answer를 참조하십시오
var items = new BindingList<KeyValuePair<string, string>>();
items.Add(new KeyValuePair<string, string>("Mpost", "Posted"));
items.Add(new KeyValuePair<string, string>("Call", "Calling"));
items.Add(new KeyValuePair<string, string>("RScan", "Re-Scan"));
myComboBox.DataSource = items;
myComboBox.ValueMember = "Key";
myComboBox.DisplayMember = "Value";
예. 어떤 종류의 콤보 박스인가? WPF, WinForms, ASP.NET? – Markus
Forms.COmboBox 인 경우 Properties tab에 Items 컬렉션이 있습니다. – Arie
WinForms 사용. – Kairan