In This Article

BarCommandListBox Class

A ListBox that lists bar commands and is for use in a run-time customize dialog.

public class BarCommandListBox : ListBox
Inheritance:
Object Object

Constructors

BarCommandListBox()

Initializes a new instance of the BarCommandListBox class.

public BarCommandListBox()

Properties

AllowCustomizeDrag

Gets or sets whether to allow customize drags.

public bool AllowCustomizeDrag { get; set; }

Property Value

Boolean:

true if customize drags should be allowed; otherwise, false.

BarManager

Gets or sets the BarManager that manages the control.

public BarManager BarManager { get; set; }

Property Value

BarManager:

The BarManager that manages the control.

DefaultSize

Gets the default size of the control.

protected override Size DefaultSize { get; }

Property Value

Size:

The default Size of the control.

SelectedCommand

Gets the selected BarCommand in the list.

public BarCommand SelectedCommand { get; }

Property Value

BarCommand:

The selected BarCommand in the list.

UseCommandName

Gets or sets whether to draw the command using the command name instead of the command text.

public bool UseCommandName { get; set; }

Property Value

Boolean:

true if the command should be drawn using the command name instead of the command text; otherwise, false.

Methods

OnDrawItem(DrawItemEventArgs)

Raises the DrawItem event.

protected override void OnDrawItem(DrawItemEventArgs e)
Parameter Type Description
e DrawItemEventArgs

A DrawItemEventArgs that contains the event data.

OnKeyPress(KeyPressEventArgs)

Raises the KeyPress event.

protected override void OnKeyPress(KeyPressEventArgs e)
Parameter Type Description
e KeyPressEventArgs

A KeyPressEventArgs that contains the event data.

OnMouseDown(MouseEventArgs)

Raises the MouseDown event.

protected override void OnMouseDown(MouseEventArgs e)
Parameter Type Description
e MouseEventArgs

A MouseEventArgs that contains the event data.

OnMouseUp(MouseEventArgs)

Raises the MouseUp event.

protected override void OnMouseUp(MouseEventArgs e)
Parameter Type Description
e MouseEventArgs

A MouseEventArgs that contains the event data.

WndProc(ref Message)

Occurs when a message is sent to the control.

protected override void WndProc(ref Message m)
Parameter Type Description
m Message

Information about the message.