Table of Contents

Class ExComboBox

Namespace
ExControls
Assembly
ExControls.dll

Extended ComboBox control: in the custom style it draws itself with separate colors for the normal, hover, selected and disabled states (ExComboBoxStyle) and can use dark scroll bars.

[ToolboxBitmap(typeof(ToolboxIcons), "Toolbox.ExComboBox.ico")]
public class ExComboBox : ComboBox, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IExControl, IThemeable
Inheritance
ExComboBox
Implements
Derived
Inherited Members
Extension Methods

Constructors

ExComboBox()

Initializes a new instance of the ExComboBox class in the default style.

public ExComboBox()

Properties

ActualBackColor

Don't use directly in the code.

[Browsable(false)]
public Color ActualBackColor { get; }

Property Value

Color

ActualForeColor

Don't use directly in code.

[Browsable(false)]
public Color ActualForeColor { get; }

Property Value

Color

BackColor

Gets or sets the background color for the control.

[Browsable(false)]
public override Color BackColor { get; set; }

Property Value

Color

A color object that represents the background color of the control. The default is the value of the DefaultBackColor property.

DefaultStyle

Gets or sets whether the control uses the default Windows style; false = the custom style drawn by the control with its own colors.

[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Default style of the Control.")]
public bool DefaultStyle { get; set; }

Property Value

bool

DrawMode

Draw mode of ComboBox

public DrawMode DrawMode { get; set; }

Property Value

DrawMode

DropDownBackColor

Background color of the drop down menu.

[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Background color of the drop down menu.")]
public Color DropDownBackColor { get; set; }

Property Value

Color

DropDownSelectedRowBackColor

Color of the selected row in drop down menu

[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Color of the selected row in drop down menu.")]
public Color DropDownSelectedRowBackColor { get; set; }

Property Value

Color

Enabled

Gets or sets a value indicating whether the control can respond to user interaction.

public bool Enabled { get; set; }

Property Value

bool

ForeColor

Gets or sets the foreground color of the control.

[Browsable(false)]
public override Color ForeColor { get; set; }

Property Value

Color

The foreground color of the control. The default is the value of the DefaultForeColor property.

StyleDisabled

Disabled style of the Control (when control is not Enabled).

[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Disabled style of the Control (when control is not Enabled).")]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ExComboBoxStyle StyleDisabled { get; set; }

Property Value

ExComboBoxStyle

StyleHighlight

Highlight style of the Control (when mouse is over control).

[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Highlight style of the Control (when mouse is over control).")]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ExComboBoxStyle StyleHighlight { get; set; }

Property Value

ExComboBoxStyle

StyleNormal

Normal style of the Control (when is inactive).

[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Normal style of the Control (when is inactive).")]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ExComboBoxStyle StyleNormal { get; set; }

Property Value

ExComboBoxStyle

StyleSelected

Selected style of the Control (when control is selected).

[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Selected style of the Control (when control is selected).")]
[TypeConverter(typeof(ExpandableObjectConverter))]
public ExComboBoxStyle StyleSelected { get; set; }

Property Value

ExComboBoxStyle

UseDarkScrollBar

Gets or sets whether the drop-down list uses dark (DarkMode_Explorer) scroll bars.

public bool UseDarkScrollBar { get; set; }

Property Value

bool

Methods

ApplyTheme(ExTheme)

Sets the colors and appearance of the control by the theme.

public void ApplyTheme(ExTheme theme)

Parameters

theme ExTheme

OnCreateControl()

Raises the CreateControl() method.

protected override void OnCreateControl()

OnDefaultStyleChanged()

Raises the DefaultStyleChanged event.

protected virtual void OnDefaultStyleChanged()

OnDrawItem(DrawItemEventArgs)

Raises the DrawItem event.

protected override void OnDrawItem(DrawItemEventArgs e)

Parameters

e DrawItemEventArgs

A DrawItemEventArgs that contains the event data.

OnDropDown(EventArgs)

Raises the DropDown event.

protected override void OnDropDown(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnDropDownBackColorChanged()

Raises the DropDownBackColorChanged event.

protected virtual void OnDropDownBackColorChanged()

OnDropDownSelectedRowBackColorChanged()

protected virtual void OnDropDownSelectedRowBackColorChanged()

OnEnter(EventArgs)

Raises the Enter event.

protected override void OnEnter(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnGotFocus(EventArgs)

Raises the GotFocus event.

protected override void OnGotFocus(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnHandleCreated(EventArgs)

Raises the HandleCreated event.

protected override void OnHandleCreated(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnHandleDestroyed(EventArgs)

Raises the HandleDestroyed event.

protected override void OnHandleDestroyed(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnLeave(EventArgs)

Raises the Leave event.

protected override void OnLeave(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnLostFocus(EventArgs)

Raises the LostFocus event.

protected override void OnLostFocus(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnMouseEnter(EventArgs)

Raises the MouseEnter event.

protected override void OnMouseEnter(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnMouseLeave(EventArgs)

Raises the MouseLeave event.

protected override void OnMouseLeave(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnPaint(PaintEventArgs)

Raises the Paint event.

protected override void OnPaint(PaintEventArgs e)

Parameters

e PaintEventArgs

A PaintEventArgs that contains the event data.

OnSelectedIndexChanged(EventArgs)

Raises the SelectedIndexChanged event.

protected override void OnSelectedIndexChanged(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

WndProc(ref Message)

Processes Windows messages.

protected override void WndProc(ref Message m)

Parameters

m Message

The Windows Message to process.

Events

DefaultStyleChanged

Occurs when the DefaultStyle property changes.

[ExCategory("Changed Property")]
[ExDescription("Occurs when the BorderColor property changes.")]
public event EventHandler? DefaultStyleChanged

Event Type

EventHandler

DropDownBackColorChanged

Occurs when the DropDownBackColor property changes.

[ExCategory("Changed Property")]
[ExDescription("Occurs when the DropDownBackColor property changes.")]
public event EventHandler? DropDownBackColorChanged

Event Type

EventHandler

DropDownSelectedRowBackColorChanged

Occurs when the DropDownSelectedRowBackColor property changes.

[ExCategory("Changed Property")]
[ExDescription("Occurs when the DropDownSelectedRowBackColor property changes.")]
public event EventHandler? DropDownSelectedRowBackColorChanged

Event Type

EventHandler