Class ListBoxBaseControl
Base class for list box controls such as ListBoxControl, CheckedListBoxControl.
Inheritance
Implements
Inherited Members
Namespace: FastReport.Dialog
Assembly: FastReport.dll
Syntax
public abstract class ListBoxBaseControl : DataFilterBaseControl, IDisposable, IFRSerializable
  Properties
ColumnWidth
Gets or sets the width of columns in a multicolumn ListBox. Wraps the System.Windows.Forms.ListBox.ColumnWidth property.
Declaration
public int ColumnWidth { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
DrawItemEvent
Gets or sets a script method name that will be used to handle the DrawItem event.
Declaration
public string DrawItemEvent { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
DrawMode
Gets or sets the drawing mode for the control.
Wraps the 
Declaration
public virtual DrawMode DrawMode { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Windows.Forms.DrawMode | 
ItemHeight
Gets or sets the height of an item in the ListBox.
Wraps the 
Declaration
public virtual int ItemHeight { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
Items
Gets the items of the ListBox. Wraps the System.Windows.Forms.ListBox.Items property.
Declaration
public ListBox.ObjectCollection Items { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Windows.Forms.ListBox.ObjectCollection | 
ItemsText
Gets or sets the string that contains all items text.
Declaration
[Browsable(false)]
public virtual string ItemsText { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
MeasureItemEvent
Gets or sets a script method name that will be used to handle the MeasureItem event.
Declaration
public string MeasureItemEvent { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
MultiColumn
Gets or sets a value indicating whether the ListBox supports multiple columns. Wraps the System.Windows.Forms.ListBox.MultiColumn property.
Declaration
public bool MultiColumn { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
SelectedIndex
Gets or sets the zero-based index of the currently selected item in a ListBox. Wraps the System.Windows.Forms.ListBox.SelectedIndex property.
Declaration
[Browsable(false)]
public int SelectedIndex { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
SelectedIndexChangedEvent
Gets or sets a script method name that will be used to handle the SelectedIndexChanged event.
Declaration
public string SelectedIndexChangedEvent { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
SelectedIndices
Gets a collection that contains the zero-based indexes of all currently selected items in the ListBox. Wraps the System.Windows.Forms.ListBox.SelectedIndices property.
Declaration
[Browsable(false)]
public ListBox.SelectedIndexCollection SelectedIndices { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Windows.Forms.ListBox.SelectedIndexCollection | 
SelectedItem
Gets or sets the currently selected item in the ListBox. Wraps the System.Windows.Forms.ListBox.SelectedItem property.
Declaration
[Browsable(false)]
public object SelectedItem { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Object | 
SelectedItems
Gets a collection containing the currently selected items in the ListBox. Wraps the System.Windows.Forms.ListBox.SelectedItems property.
Declaration
[Browsable(false)]
public ListBox.SelectedObjectCollection SelectedItems { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Windows.Forms.ListBox.SelectedObjectCollection | 
SelectionMode
Gets or sets the method in which items are selected in the ListBox. Wraps the System.Windows.Forms.ListBox.SelectionMode property.
Declaration
public SelectionMode SelectionMode { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Windows.Forms.SelectionMode | 
Sorted
Gets or sets a value indicating whether the items in the ListBox are sorted alphabetically. Wraps the System.Windows.Forms.ListBox.Sorted property.
Declaration
public bool Sorted { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
UseTabStops
Gets or sets a value indicating whether the ListBox can recognize and expand tab characters when drawing its strings. Wraps the System.Windows.Forms.ListBox.UseTabStops property.
Declaration
public bool UseTabStops { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Methods
AttachEvents()
Attaches Control events to its event handlers.
Declaration
protected override void AttachEvents()
  Overrides
Remarks
Override this method if your custom control has own events.
DetachEvents()
Detaches Control events from its event handlers.
Declaration
protected override void DetachEvents()
  Overrides
Remarks
Override this method if your custom control has own events. In this method, you should detach control's events that were attached in the AttachEvents() method.
FillData(DataSourceBase, Column)
Fills the control with data.
Declaration
protected override void FillData(DataSourceBase dataSource, Column column)
  Parameters
| Type | Name | Description | 
|---|---|---|
| DataSourceBase | dataSource | The data source.  | 
      
| Column | column | The data column.  | 
      
Overrides
OnDrawItem(DrawItemEventArgs)
This method fires the DrawItem event and the script code connected to the DrawItemEvent.
Declaration
public virtual void OnDrawItem(DrawItemEventArgs e)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Windows.Forms.DrawItemEventArgs | e | Event data.  | 
      
OnMeasureItem(MeasureItemEventArgs)
This method fires the MeasureItem event and the script code connected to the MeasureItemEvent.
Declaration
public virtual void OnMeasureItem(MeasureItemEventArgs e)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Windows.Forms.MeasureItemEventArgs | e | Event data.  | 
      
OnSelectedIndexChanged(EventArgs)
This method fires the SelectedIndexChanged event and the script code connected to the SelectedIndexChangedEvent.
Declaration
public virtual void OnSelectedIndexChanged(EventArgs e)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.EventArgs | e | Event data.  | 
      
Serialize(FRWriter)
Serializes the object.
Declaration
public override void Serialize(FRWriter writer)
  Parameters
| Type | Name | Description | 
|---|---|---|
| FRWriter | writer | Writer object.  | 
      
Overrides
Remarks
Do not call this method directly. You should override it if you are developing a new component for FastReport.
This method is called when the object needs to save the state. It may happen when:
- saving the report to the file or stream;
 - saving the report to the designer's undo buffer;
 - assigning the object to another object using the Assign(Base) or AssignAll methods;
 - saving the object to the designer's clipboard;
 - saving the object to the preview (when run a report).
 
Events
DrawItem
Occurs when a visual aspect of an owner-drawn ListBox changes.
Wraps the 
Declaration
public event DrawItemEventHandler DrawItem
  Event Type
| Type | Description | 
|---|---|
| System.Windows.Forms.DrawItemEventHandler | 
MeasureItem
Occurs when an owner-drawn ListBox is created and the sizes of the list items are determined.
Wraps the 
Declaration
public event MeasureItemEventHandler MeasureItem
  Event Type
| Type | Description | 
|---|---|
| System.Windows.Forms.MeasureItemEventHandler | 
SelectedIndexChanged
Occurs when the SelectedIndex property has changed.
Wraps the 
Declaration
public event EventHandler SelectedIndexChanged
  Event Type
| Type | Description | 
|---|---|
| System.EventHandler |