C# Class vbAccelerator.Components.Controls.VListBox

A simple implementation of a Virtual ListBox. A virtual ListBox contains no data, instead it just allocates space for a specified number of rows. Whenever a row needs to be shown, the OnDrawItem method is fired which in turn fires the DrawItem event.
Inheritance: System.Windows.Forms.ListBox
Mostra file Open project: Blackfrosch/VAGEDCSuite Class Usage Examples

Private Properties

Property Type Description
GetScrollInfo int
SendMessage int

Public Methods

Method Description
DefaultDrawItem ( DrawItemEventArgs e, String text, Brush foreGround ) : void
ItemSelected ( int index ) : bool

Gets the selection state for an item.

ItemSelected ( int index, bool state ) : void

Sets the selection state for an item.

VListBox ( ) : System

Constructs a new instance of this class.

Protected Methods

Method Description
OnDrawItem ( DrawItemEventArgs e ) : void

Called when an item in the control needs to be drawn, and raises the DrawItem event.

OnHandleDestroyed ( EventArgs e ) : void

Called when the ListBox handle is destroyed.

WndProc ( System &msg ) : void

Private Methods

Method Description
GetScrollInfo ( IntPtr hWnd, int n, ScrollInfoStruct &lpScrollInfo ) : int
SendMessage ( IntPtr hWnd, int msg, int wParam, IntPtr lParam ) : int

Method Details

DefaultDrawItem() public method

public DefaultDrawItem ( DrawItemEventArgs e, String text, Brush foreGround ) : void
e System.Windows.Forms.DrawItemEventArgs
text String
foreGround System.Drawing.Brush
return void

ItemSelected() public method

Gets the selection state for an item.
public ItemSelected ( int index ) : bool
index int Index of the item.
return bool

ItemSelected() public method

Sets the selection state for an item.
public ItemSelected ( int index, bool state ) : void
index int Index of the item.
state bool New selection state for the item.
return void

OnDrawItem() protected method

Called when an item in the control needs to be drawn, and raises the DrawItem event.
protected OnDrawItem ( DrawItemEventArgs e ) : void
e System.Windows.Forms.DrawItemEventArgs Details about the item that is to be drawn.
return void

OnHandleDestroyed() protected method

Called when the ListBox handle is destroyed.
protected OnHandleDestroyed ( EventArgs e ) : void
e System.EventArgs Not used
return void

VListBox() public method

Constructs a new instance of this class.
public VListBox ( ) : System
return System

WndProc() protected method

protected WndProc ( System &msg ) : void
msg System
return void