C# Class Nexus.UI.Controls.PanelToolStripItem

The object that can be added to PanelToolStrips.
This class is a wrapper for the actual controls that get added to the PanelToolStrip. The purpose of this wrapper is to provide a single event that gets raised in a consistent manner to which commands can be attached. This class also serves to track various metadata about the controls.
Show file Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
PanelToolStripItem ( Control p_ctlButton, string p_strEvent, Int32 p_intIndex, ToolStripItemDisplayStyle p_tdsDisplayStyle ) : System

A simple constructor.

This constructor wires the appropriate event p_ctlButton to the Selected event.

SetSelected ( ) : void

Sets the item as selected.

SetUnselected ( ) : void

Sets the item as not selected.

Protected Methods

Method Description
OnSelected ( object sender, EventArgs e ) : void

Raises the Selected event.

Method Details

OnSelected() protected method

Raises the Selected event.
protected OnSelected ( object sender, EventArgs e ) : void
sender object The object that raised the event.
e System.EventArgs An desribing the event arguments.
return void

PanelToolStripItem() public method

A simple constructor.
This constructor wires the appropriate event p_ctlButton to the Selected event.
public PanelToolStripItem ( Control p_ctlButton, string p_strEvent, Int32 p_intIndex, ToolStripItemDisplayStyle p_tdsDisplayStyle ) : System
p_ctlButton System.Windows.Forms.Control The actual control that is to be added to the .
p_strEvent string The name of the event on the button control to which to bind the event.
p_intIndex System.Int32 The index of this item in the panel.
p_tdsDisplayStyle ToolStripItemDisplayStyle The indicating how text and /// images are displayed on this item.
return System

SetSelected() public method

Sets the item as selected.
public SetSelected ( ) : void
return void

SetUnselected() public method

Sets the item as not selected.
public SetUnselected ( ) : void
return void