Ribbon for WinForms
コンボボックス
要素 > リボンアイテム > コンボボックス

A ComboBox is a combination of a single-line text box with drop-down list. The ComboBox item in this is highlighted below:

The ComboBox can be added at design-time using the Floating Toolbar or Collection Editor. Refer this topic for detailed information.

A ComboBox can also be added to the C1Ribbon control through the code using the RibbonComboBox class. This is depicted in the code below:

' リボン項目のComboBoxを追加します
Dim ribbonComboBox As RibbonComboBox = New RibbonComboBox()
ribbonComboBox.Label = "State"
ribbonComboBox.TextAreaWidth = 100
Dim defaultView As RibbonButton = New RibbonButton("Default")
Dim comapactView As RibbonButton = New RibbonButton("Compact")
Dim backstageView As RibbonButton = New RibbonButton("BackstageView")
ribbonComboBox.Items.Add(defaultView)
ribbonComboBox.Items.Add(comapactView)
ribbonComboBox.Items.Add(backstageView)
formatGroup.Items.Add(ribbonComboBox)
//リボン項目のComboBoxを追加します
RibbonComboBox ribbonComboBox = new RibbonComboBox();
ribbonComboBox.Label = "State";
ribbonComboBox.TextAreaWidth = 100;
RibbonButton defaultView = new RibbonButton("Default");
RibbonButton comapactView = new RibbonButton("Compact");
RibbonButton backstageView = new RibbonButton("BackstageView");
ribbonComboBox.Items.Add(defaultView);
ribbonComboBox.Items.Add(comapactView);
ribbonComboBox.Items.Add(backstageView);
formatGroup.Items.Add(ribbonComboBox);