Input for WinForms | ComponentOne
Input Controls / SplitButton
In This Topic
    SplitButton
    In This Topic

    The SplitButton control lets the user execute an action which is bound to a button or select a predefined action from a drop-down list of items. C1SplitButton consists of a main button and a dropdown.

    Image of splitbutton with dropdown popped out.

    Users can drag a SplitButton on the form and add the items to populate in the dropdown using the SplitButtonItem Collection Editor from the Items property in the Property window. Click the Add button and enter the required text in the Text property of SplitButtonItem class.

    An editor dialog box with which users can add items in the splitbutton dropdown.

    Now, configure the SplitButton control by using the code as shown below:

    C#
    Copy Code
    //Configuring a splitbutton         
      c1SplitButton1.Location = new Point(134, 40);
      c1SplitButton1.Name = "c1SplitButton1";
      c1SplitButton1.Size = new Size(121, 27);
      c1SplitButton1.TabIndex = 3;
      c1SplitButton1.Text = "c1SplitButton1";