ComponentOne Input for WinForms
Input for WinForms Task-Based Help / Displaying a Border Color for the C1Input Controls
In This Topic
    Displaying a Border Color for the C1Input Controls
    In This Topic

    A border color can be applied to C1DateEdit, C1Label, C1NumericEdit, C1DropDownControl, and C1TextBox controls.

    To create a border color for the C1DropDownControl at design time

    1. Add a C1DropDownControl to your form.
    2. Navigate to C1DropDownControl’s properties window and set the BorderStyle property to “FixedSingle”.
    3. Change C1DropDownControl’s BorderColor property to “Red”.

    To create a border color for the C1DropDownControl programmatically

    Use the following code to add a border color to the C1DropDownControl:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim dropdown As New C1DropDownControl
            Me.Controls.Add(dropdown)
            dropdown.BorderStyle = BorderStyle.FixedSingle
            dropdown.BorderColor = Color.Red
        End Sub
    

    To write code in C#

    C#
    Copy Code
    private void Form1_Load(object sender, EventArgs e)
            {
                C1DropDownControl dropdown = new C1DropDownControl();
                this.Controls.Add(dropdown);
                dropdown.BorderStyle = BorderStyle.FixedSingle;
                dropdown.BorderColor = Color.Red;
            }
    

    tickThis topic illustrates the following:

    A red border color with a fixed single border style is added to the C1DropDownControl.

    c1input_bordercolor_property

    See Also