# Customizing the Drop-Down Editor

Learn how to customize the drop-down editor.

## Content



The drop-down form below includes option buttons and button controls for the user to make a selection from the [C1DropDownControl](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1DropDownControl.html).

The drop-down form appearance properties have been edited so that the form appears as below:

![dropdowneditor](https://cdn.mescius.io/document-site-files/images/6c2f30e9-4d3a-4f86-b649-ecbef777b3a3/images/customizedropdowneditor.png)

Select the form class name (for this example, WindowsApplication1.DropDownForm1) in the [DropDownFormClassName](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1DropDownControl.DropDownFormClassName.html) property of your C1DropDownControl. Notice that when you run the project and select the drop-down arrow, the drop-down form now appears.

### Enable the button controls on the drop-down form:

1.  Set the **AcceptButton** and **CancelButton** properties of your DropDownForm1 to **button1** and **button2**, respectively.
2.  Select the **OK** button and set its **DialogResult** property to **OK**. Similarly, select the **Cancel** button and set its **DialogResult** property to **Cancel**.
3.  To make the drop-down form change the control text when it is closed after the user clicks an item, add the following event handler for the [PostChanges](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.DropDownForm.PostChanges.html) event:
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in Visual Basic
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```vbnet
    Private Sub DropDownForm1_PostChanges(sender As Object, e As System.EventArgs)
        If (MyBase.DialogResult = DialogResult.OK) Then
            Dim control1 As Control
            For Each control1 In MyBase.Controls
                If (TypeOf control1 is RadioButton AndAlso CType(control1, RadioButton).Checked) Then
                    MyBase.OwnerControl.Value = CType(control1, RadioButton).Text
                End If
            Next
        End If
    End Sub
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
    DOC-DETAILS-TAG-OPEN
    
    DOC-SUMMARY-TAG-OPEN
    
    To write code in C#
    
    DOC-SUMMARY-TAG-CLOSE
    
    ```csharp
    private void DropDownForm1_PostChanges(object sender, System.EventArgs e)
    {
        if (DialogResult == DialogResult.OK)
        {
            foreach (Control control1 in Controls)
            {
                if (control1 as RadioButton != null && ((RadioButton)control1).Checked)
                {
                    OwnerControl.Value = ((RadioButton)control1).Text;
                }
            }
        }
    }
    ```
    
    DOC-DETAILS-TAG-CLOSE
    
4.  At design time, select DropDownForm1 to view its properties in the Properties window, and then select the **Events** button ![eventbutton](https://cdn.mescius.io/document-site-files/images/6c2f30e9-4d3a-4f86-b649-ecbef777b3a3/images/eventbutton.png)from the Properties toolbar.
5.  Set the DropDownForm1.PostChanges event to **DropDownForm1\_PostChanges**.
6.  To make the **OK** button (button1) receive focus when the form opens, set the DropDownForm1.[FocusControl](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.DropDownForm.FocusControl.html) property to **button1**.
7.  To have a check in the **Standard** option button, in design time select **radiobutton1** and set its **Checked** property to **True**.

### This topic illustrates the following:

Your form should appear similar to the form below:

![dropdownform](https://cdn.mescius.io/document-site-files/images/6c2f30e9-4d3a-4f86-b649-ecbef777b3a3/images/deliverydropdownform.png)

## See Also

[Customizing the C1DropDownControl](/componentone/docs/win/online-input/inputforwinformstask/addingadropdownform/customizingthec1drop)