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.
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.
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"; |