ComponentOne Input for WinForms
Using the C1Input Controls / Custom Drop-Down
In This Topic
    Custom Drop-Down
    In This Topic

    C1Input includes a powerful custom drop-down functionality that allows you to create any drop-down editor you need, in addition to the standard calendar and calculator drop-downs provided by C1Input. Drop-down editors are created visually as forms in your project.

    To create your own custom drop-down editor, use the C1DropDownControl. This control class derives from C1TextBox and adds custom drop-down functionality and up/down buttons.

    To create a drop-down editor for your control:

    1. Add a form to your project derived from C1.Win.C1Input.DropDownForm and select the form class name in the DropDownFormClassName property of your C1DropDownControl.

    2. In your DropDownForm-derived form you can set the Value property of C1DropDownControl when necessary (use the DropDownForm.OwnerControl property to get the control object), or you can do it when the form is closing, in the PostChanges event.

    See the DropDownForm class reference for the full description of available options for custom drop-down forms. Also see Documents\ComponentOne Samples\WinForms (installed by default) for common-use samples of the custom drop-down functionality.

    If you need to create a custom control with drop-down functionality, this can be done by deriving a custom control class from C1DropDownControl and overriding its C1DropDownControl.DefaultDropDownFormClassName property.

    See Also