C# Class ComponentFactory.Krypton.Toolkit.KryptonCheckedListBox

Inheritance: VisualControlBase, IContainedInputControl
Show file Open project: ComponentFactory/Krypton Class Usage Examples

Private Properties

Property Type Description
CreateControlsInstance System.Windows.Forms.Control.ControlCollection
GetDoubleState IPaletteDouble
OnListBoxDrawItem void
OnListBoxFormat void
OnListBoxFormatInfoChanged void
OnListBoxFormatStringChanged void
OnListBoxFormattingEnabledChanged void
OnListBoxGotFocus void
OnListBoxItemCheck void
OnListBoxKeyDown void
OnListBoxKeyPress void
OnListBoxKeyUp void
OnListBoxLostFocus void
OnListBoxMeasureItem void
OnListBoxMouseChange void
OnListBoxPreviewKeyDown void
OnListBoxSelectedIndexChanged void
OnListBoxSelectedValueChanged void
OnListBoxValidated void
OnListBoxValidating void
ResetBackStyle void
ResetBorderStyle void
ResetItemStyle void
ShouldSerializeBackStyle bool
ShouldSerializeBorderStyle bool
ShouldSerializeImages bool
ShouldSerializeItemStyle bool
ShouldSerializeOverrideFocus bool
ShouldSerializeStateActive bool
ShouldSerializeStateCheckedNormal bool
ShouldSerializeStateCheckedPressed bool
ShouldSerializeStateCheckedTracking bool
ShouldSerializeStateCommon bool
ShouldSerializeStateDisabled bool
ShouldSerializeStateNormal bool
ShouldSerializeStatePressed bool
ShouldSerializeStateTracking bool
UpdateContentFromItemIndex void
UpdateStateAndPalettes void

Public Methods

Method Description
BeginUpdate ( ) : void

Maintains performance while items are added to the ListBox one at a time by preventing the control from drawing until the EndUpdate method is called.

ClearSelected ( ) : void

Unselects all items in the KryptonCheckedListBox.

EndUpdate ( ) : void

Resumes painting the ListBox control after painting is suspended by the BeginUpdate method.

FindString ( string str ) : int

Finds the first item in the list box that starts with the specified string.

FindString ( string str, int startIndex ) : int

Finds the first item after the given index which starts with the given string. The search is not case sensitive.

FindStringExact ( string str ) : int

Finds the first item in the list box that matches the specified string.

FindStringExact ( string str, int startIndex ) : int

Finds the first item after the specified index that matches the specified string.

Focus ( ) : bool

Sets input focus to the control.

GetItemCheckState ( int index ) : CheckState

Returns a value indicating the check state of the current item.

GetItemChecked ( int index ) : bool

Returns a value indicating whether the specified item is checked.

GetItemHeight ( int index ) : int

Returns the height of an item in the KryptonCheckedListBox.

GetItemRectangle ( int index ) : Rectangle

Returns the bounding rectangle for an item in the KryptonCheckedListBox.

GetItemText ( object item ) : string

Returns the text representation of the specified item.

GetSelected ( int index ) : bool

Returns a value indicating whether the specified item is selected.

IndexFromPoint ( Point p ) : int

Returns the zero-based index of the item at the specified coordinates.

IndexFromPoint ( int x, int y ) : int

Returns the zero-based index of the item at the specified coordinates.

KryptonCheckedListBox ( ) : System

Initialize a new instance of the KryptonCheckedListBox class.

Select ( ) : void

Activates the control.

SetFixedState ( bool active ) : void

Sets the fixed state of the control.

SetItemCheckState ( int index, CheckState value ) : void

Sets the check state of the item at the specified index.

SetItemChecked ( int index, bool value ) : void

Sets CheckState for the item at the specified index to Checked.

SetSelected ( int index, bool value ) : void

Selects or clears the selection for the specified item in a KryptonCheckedListBox.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases all resources used by the Control.

ForceControlLayout ( ) : void

Force the layout logic to size and position the controls.

OnBackColorChanged ( EventArgs e ) : void

Raises the BackColorChanged event.

OnBackgroundImageChanged ( EventArgs e ) : void

Raises the BackgroundImageChanged event.

OnBackgroundImageLayoutChanged ( EventArgs e ) : void

Raises the BackgroundImageLayoutChanged event.

OnCausesValidationChanged ( EventArgs e ) : void

Raises the CausesValidationChanged event.

OnEnabledChanged ( EventArgs e ) : void

Raises the EnabledChanged event.

OnForeColorChanged ( EventArgs e ) : void

Raises the ForeColorChanged event.

OnFormat ( System.Windows.Forms.ListControlConvertEventArgs e ) : void

Raises the Format event.

OnFormatInfoChanged ( EventArgs e ) : void

Raises the FormatInfoChanged event.

OnFormatStringChanged ( EventArgs e ) : void

Raises the FormatStringChanged event.

OnFormattingEnabledChanged ( EventArgs e ) : void

Raises the FormattingEnabledChanged event.

OnHandleCreated ( EventArgs e ) : void

Raises the HandleCreated event.

OnItemCheck ( System.Windows.Forms.ItemCheckEventArgs e ) : void

Raises the ItemCheck event.

OnLayout ( System.Windows.Forms.LayoutEventArgs levent ) : void

Raises the Layout event.

OnMouseEnter ( EventArgs e ) : void

Raises the MouseEnter event.

OnMouseLeave ( EventArgs e ) : void

Raises the MouseLeave event.

OnNeedPaint ( object sender, NeedLayoutEventArgs e ) : void

Processes a notification from palette storage of a paint and optional layout required.

OnPaddingChanged ( EventArgs e ) : void

Raises the PaddingChanged event.

OnPaint ( PaintEventArgs e ) : void

Raises the Paint event.

OnPaletteChanged ( EventArgs e ) : void

Raises the PaletteChanged event.

OnPaletteNeedPaint ( object sender, NeedLayoutEventArgs e ) : void

Processes a notification from palette of a paint and optional layout required.

OnSelectedIndexChanged ( EventArgs e ) : void

Raises the SelectedIndexChanged event.

OnSelectedValueChanged ( EventArgs e ) : void

Raises the SelectedValueChanged event.

OnTabStopChanged ( EventArgs e ) : void

Raises the TabStop event.

OnTextChanged ( EventArgs e ) : void

Raises the TextChanged event.

OnTrackMouseEnter ( EventArgs e ) : void

Raises the TrackMouseEnter event.

OnTrackMouseLeave ( EventArgs e ) : void

Raises the TrackMouseLeave event.

Private Methods

Method Description
CreateControlsInstance ( ) : Control.ControlCollection
GetDoubleState ( ) : IPaletteDouble
OnListBoxDrawItem ( object sender, DrawItemEventArgs e ) : void
OnListBoxFormat ( object sender, System.Windows.Forms.ListControlConvertEventArgs e ) : void
OnListBoxFormatInfoChanged ( object sender, EventArgs e ) : void
OnListBoxFormatStringChanged ( object sender, EventArgs e ) : void
OnListBoxFormattingEnabledChanged ( object sender, EventArgs e ) : void
OnListBoxGotFocus ( object sender, EventArgs e ) : void
OnListBoxItemCheck ( object sender, System.Windows.Forms.ItemCheckEventArgs e ) : void
OnListBoxKeyDown ( object sender, KeyEventArgs e ) : void
OnListBoxKeyPress ( object sender, KeyPressEventArgs e ) : void
OnListBoxKeyUp ( object sender, KeyEventArgs e ) : void
OnListBoxLostFocus ( object sender, EventArgs e ) : void
OnListBoxMeasureItem ( object sender, System.Windows.Forms.MeasureItemEventArgs e ) : void
OnListBoxMouseChange ( object sender, EventArgs e ) : void
OnListBoxPreviewKeyDown ( object sender, PreviewKeyDownEventArgs e ) : void
OnListBoxSelectedIndexChanged ( object sender, EventArgs e ) : void
OnListBoxSelectedValueChanged ( object sender, EventArgs e ) : void
OnListBoxValidated ( object sender, EventArgs e ) : void
OnListBoxValidating ( object sender, CancelEventArgs e ) : void
ResetBackStyle ( ) : void
ResetBorderStyle ( ) : void
ResetItemStyle ( ) : void
ShouldSerializeBackStyle ( ) : bool
ShouldSerializeBorderStyle ( ) : bool
ShouldSerializeImages ( ) : bool
ShouldSerializeItemStyle ( ) : bool
ShouldSerializeOverrideFocus ( ) : bool
ShouldSerializeStateActive ( ) : bool
ShouldSerializeStateCheckedNormal ( ) : bool
ShouldSerializeStateCheckedPressed ( ) : bool
ShouldSerializeStateCheckedTracking ( ) : bool
ShouldSerializeStateCommon ( ) : bool
ShouldSerializeStateDisabled ( ) : bool
ShouldSerializeStateNormal ( ) : bool
ShouldSerializeStatePressed ( ) : bool
ShouldSerializeStateTracking ( ) : bool
UpdateContentFromItemIndex ( int index ) : void
UpdateStateAndPalettes ( ) : void

Method Details

BeginUpdate() public method

Maintains performance while items are added to the ListBox one at a time by preventing the control from drawing until the EndUpdate method is called.
public BeginUpdate ( ) : void
return void

ClearSelected() public method

Unselects all items in the KryptonCheckedListBox.
public ClearSelected ( ) : void
return void

Dispose() protected method

Releases all resources used by the Control.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

EndUpdate() public method

Resumes painting the ListBox control after painting is suspended by the BeginUpdate method.
public EndUpdate ( ) : void
return void

FindString() public method

Finds the first item in the list box that starts with the specified string.
public FindString ( string str ) : int
str string The String to search for.
return int

FindString() public method

Finds the first item after the given index which starts with the given string. The search is not case sensitive.
public FindString ( string str, int startIndex ) : int
str string The String to search for.
startIndex int The zero-based index of the item before the first item to be searched. Set to -1 to search from the beginning of the control.
return int

FindStringExact() public method

Finds the first item in the list box that matches the specified string.
public FindStringExact ( string str ) : int
str string The String to search for.
return int

FindStringExact() public method

Finds the first item after the specified index that matches the specified string.
public FindStringExact ( string str, int startIndex ) : int
str string The String to search for.
startIndex int The zero-based index of the item before the first item to be searched. Set to -1 to search from the beginning of the control.
return int

Focus() public method

Sets input focus to the control.
public Focus ( ) : bool
return bool

ForceControlLayout() protected method

Force the layout logic to size and position the controls.
protected ForceControlLayout ( ) : void
return void

GetItemCheckState() public method

Returns a value indicating the check state of the current item.
public GetItemCheckState ( int index ) : CheckState
index int The index of the item to get the checked value of.
return CheckState

GetItemChecked() public method

Returns a value indicating whether the specified item is checked.
public GetItemChecked ( int index ) : bool
index int The index of the item.
return bool

GetItemHeight() public method

Returns the height of an item in the KryptonCheckedListBox.
public GetItemHeight ( int index ) : int
index int The index of the item to return the height of.
return int

GetItemRectangle() public method

Returns the bounding rectangle for an item in the KryptonCheckedListBox.
public GetItemRectangle ( int index ) : Rectangle
index int The zero-based index of item whose bounding rectangle you want to return.
return System.Drawing.Rectangle

GetItemText() public method

Returns the text representation of the specified item.
public GetItemText ( object item ) : string
item object The object from which to get the contents to display.
return string

GetSelected() public method

Returns a value indicating whether the specified item is selected.
public GetSelected ( int index ) : bool
index int The zero-based index of the item that determines whether it is selected.
return bool

IndexFromPoint() public method

Returns the zero-based index of the item at the specified coordinates.
public IndexFromPoint ( Point p ) : int
p Point A Point object containing the coordinates used to obtain the item index.
return int

IndexFromPoint() public method

Returns the zero-based index of the item at the specified coordinates.
public IndexFromPoint ( int x, int y ) : int
x int The x-coordinate of the location to search.
y int The y-coordinate of the location to search.
return int

KryptonCheckedListBox() public method

Initialize a new instance of the KryptonCheckedListBox class.
public KryptonCheckedListBox ( ) : System
return System

OnBackColorChanged() protected method

Raises the BackColorChanged event.
protected OnBackColorChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnBackgroundImageChanged() protected method

Raises the BackgroundImageChanged event.
protected OnBackgroundImageChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnBackgroundImageLayoutChanged() protected method

Raises the BackgroundImageLayoutChanged event.
protected OnBackgroundImageLayoutChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnCausesValidationChanged() protected method

Raises the CausesValidationChanged event.
protected OnCausesValidationChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnEnabledChanged() protected method

Raises the EnabledChanged event.
protected OnEnabledChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnForeColorChanged() protected method

Raises the ForeColorChanged event.
protected OnForeColorChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnFormat() protected method

Raises the Format event.
protected OnFormat ( System.Windows.Forms.ListControlConvertEventArgs e ) : void
e System.Windows.Forms.ListControlConvertEventArgs An EventArgs containing the event data.
return void

OnFormatInfoChanged() protected method

Raises the FormatInfoChanged event.
protected OnFormatInfoChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs containing the event data.
return void

OnFormatStringChanged() protected method

Raises the FormatStringChanged event.
protected OnFormatStringChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs containing the event data.
return void

OnFormattingEnabledChanged() protected method

Raises the FormattingEnabledChanged event.
protected OnFormattingEnabledChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs containing the event data.
return void

OnHandleCreated() protected method

Raises the HandleCreated event.
protected OnHandleCreated ( EventArgs e ) : void
e System.EventArgs An EventArgs containing the event data.
return void

OnItemCheck() protected method

Raises the ItemCheck event.
protected OnItemCheck ( System.Windows.Forms.ItemCheckEventArgs e ) : void
e System.Windows.Forms.ItemCheckEventArgs An ItemCheckEventArgs containing the event data.
return void

OnLayout() protected method

Raises the Layout event.
protected OnLayout ( System.Windows.Forms.LayoutEventArgs levent ) : void
levent System.Windows.Forms.LayoutEventArgs An EventArgs that contains the event data.
return void

OnMouseEnter() protected method

Raises the MouseEnter event.
protected OnMouseEnter ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnMouseLeave() protected method

Raises the MouseLeave event.
protected OnMouseLeave ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnNeedPaint() protected method

Processes a notification from palette storage of a paint and optional layout required.
protected OnNeedPaint ( object sender, NeedLayoutEventArgs e ) : void
sender object Source of notification.
e NeedLayoutEventArgs An NeedLayoutEventArgs containing event data.
return void

OnPaddingChanged() protected method

Raises the PaddingChanged event.
protected OnPaddingChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnPaint() protected method

Raises the Paint event.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs An PaintEventArgs that contains the event data.
return void

OnPaletteChanged() protected method

Raises the PaletteChanged event.
protected OnPaletteChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnPaletteNeedPaint() protected method

Processes a notification from palette of a paint and optional layout required.
protected OnPaletteNeedPaint ( object sender, NeedLayoutEventArgs e ) : void
sender object Source of notification.
e NeedLayoutEventArgs An NeedLayoutEventArgs containing event data.
return void

OnSelectedIndexChanged() protected method

Raises the SelectedIndexChanged event.
protected OnSelectedIndexChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs containing the event data.
return void

OnSelectedValueChanged() protected method

Raises the SelectedValueChanged event.
protected OnSelectedValueChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs containing the event data.
return void

OnTabStopChanged() protected method

Raises the TabStop event.
protected OnTabStopChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data.
return void

OnTextChanged() protected method

Raises the TextChanged event.
protected OnTextChanged ( EventArgs e ) : void
e System.EventArgs An PaintEventArgs that contains the event data.
return void

OnTrackMouseEnter() protected method

Raises the TrackMouseEnter event.
protected OnTrackMouseEnter ( EventArgs e ) : void
e System.EventArgs An EventArgs containing the event data.
return void

OnTrackMouseLeave() protected method

Raises the TrackMouseLeave event.
protected OnTrackMouseLeave ( EventArgs e ) : void
e System.EventArgs An EventArgs containing the event data.
return void

Select() public method

Activates the control.
public Select ( ) : void
return void

SetFixedState() public method

Sets the fixed state of the control.
public SetFixedState ( bool active ) : void
active bool Should the control be fixed as active.
return void

SetItemCheckState() public method

Sets the check state of the item at the specified index.
public SetItemCheckState ( int index, CheckState value ) : void
index int The index of the item to set the state for.
value CheckState One of the CheckState values.
return void

SetItemChecked() public method

Sets CheckState for the item at the specified index to Checked.
public SetItemChecked ( int index, bool value ) : void
index int The index of the item to set the check state for.
value bool true to set the item as checked; otherwise, false.
return void

SetSelected() public method

Selects or clears the selection for the specified item in a KryptonCheckedListBox.
public SetSelected ( int index, bool value ) : void
index int The zero-based index of the item in a KryptonCheckedListBox to select or clear the selection for.
value bool true to select the specified item; otherwise, false.
return void