# Displaying Clicked C1DropDown Buttons in a Text Box

This topic provides info about displaying clicked C1DropDown Buttons in a Text Box.

## Content



To display clicked [C1DropDownControl](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1DropDownControl.html) buttons in a text box, use the **C1DropDownControl.UpDownButtonClick** event. In this example, the output will be displayed in a textbox (TextBox1).

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
Private Sub C1DropDownControl1_UpDownButtonClick(ByVal sender As Object, ByVal e As C1.Win.C1Input.UpDownButtonClickEventArgs) Handles C1DropDownControl1.UpDownButtonClick
    If (e.Delta = 1) Then
        Me.TextBox1.AppendText("Up " & ControlChars.CrLf)
    ElseIf (e.Delta = -1) Then
        Me.TextBox1.AppendText("Down " & ControlChars.CrLf)
    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 c1DropDownControl1_UpDownButtonClick(object sender, C1.Win.C1Input.UpDownButtonClickEventArgs e)
{
    if ((e.Delta == 1))
    {
        this.textBox1.AppendText("Up\r\n");
    }
    else if ((e.Delta == -1))
    {
        this.textBox1.AppendText("Down\r\n");
    }
}
```

DOC-DETAILS-TAG-CLOSE

### This topic illustrates the following:

When the **Up** or **Down** buttons are clicked in the **C1DropDownControl**, the words Up or Down will appear in a textbox to indicated which button was pressed.

![dropdown-control](https://cdn.mescius.io/document-site-files/images/6c2f30e9-4d3a-4f86-b649-ecbef777b3a3/images/clicked_dropdown_control.gif)

## See Also

[Customizing the PictureBox](customizingthepicture.html)