我想在組合框中設置文本。下面是代碼 -無法在DropDownList中的Combox框中設置文本
private System.Windows.Forms.ComboBox selectModel;
this.selectModel = new System.Windows.Forms.ComboBox();
this.selectModel.Name = "selectModel";
this.selectModel.FormattingEnabled = true;
this.selectModel.Size = new System.Drawing.Size(64, 21);
this.selectModel.Location = new System.Drawing.Point(3, 76);
this.selectModel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
下面的行不working-
selectModel.SelectedText = getModelNameFromConf();
文檔說「它獲取或設置在組合框的編輯部分選擇的文本」 。我無法對用戶進行編輯。
請任何解決方法。
它是Windows窗體應用程序嗎?爲什麼ASP.NET標籤? – MarcusVinicius 2014-09-01 19:47:37