If inscribe
I created a task pane in vsto, pane in a combobox control, no matter which initializes the combobox items are no drop-down box no options
Initialization code when the following
. Microsoft. Office. The Tools CustomTaskPane ctp1;
UserControl1 ucs 1;
Private void ThisAddIn_Startup (object sender, System. EventArgs e)
{
Ucs 1=new UserControl1 ();
Ctp1=Globals. ThisAddIn. CustomTaskPanes. Add (ucs 1, "initialization key");
Ctp1. Visible=true;
//MessageBox. Show (" load success!" );
}
This is a ThisAddIn.
in the cs
Below is UserControl1.
in the csPublic partial class UserControl1: UserControl
{
Public UserControl1 ()
{
InitializeComponent ();
}
Private void UserControl1_load (object sender, EventArgs e)
{
This.com boBox1. Items. The Add (" default key ");
This.com boBox1. Items. The Add (" custom key ");
This.com boBox1. SelectedIndex=0;
}
Has the attribute of the ComboBox DropDownStyle DropDownList