Class CheckedComboBoxControl
Represents a Windows combo box control with CheckBox items. Wraps the System.Windows.Forms.ComboBox control.
Inheritance
Inherited Members
Namespace: FastReport.Dialog
Assembly: FastReport.dll
Syntax
public class CheckedComboBoxControl : ComboBoxControl, IComponent, IDisposable, IFRSerializable, IHasEditor
Constructors
CheckedComboBoxControl()
Initializes a new instance of the ComboBoxControl class with default settings.
Declaration
public CheckedComboBoxControl()
Properties
ComboBox
Gets an internal ComboBox.
Declaration
[Browsable(false)]
public ComboBox ComboBox { get; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.ComboBox |
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 a value indicating whether your code or the operating system will handle drawing of elements in the list. Wraps the System.Windows.Forms.ComboBox.DrawMode property.
Declaration
public DrawMode DrawMode { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.DrawMode |
DropDownHeight
Gets or sets the height in pixels of the drop-down portion of the ComboBox. Wraps the System.Windows.Forms.ComboBox.DropDownHeight property.
Declaration
public int DropDownHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DropDownStyle
Gets or sets a value specifying the style of the combo box. Wraps the System.Windows.Forms.ComboBox.DropDownStyle property.
Declaration
public ComboBoxStyle DropDownStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.ComboBoxStyle |
DropDownWidth
Gets or sets the width of the of the drop-down portion of a combo box. Wraps the System.Windows.Forms.ComboBox.DropDownWidth property.
Declaration
public int DropDownWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ItemHeight
Gets or sets the height of an item in the combo box. Wraps the System.Windows.Forms.ComboBox.ItemHeight property.
Declaration
public int ItemHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Items
Gets a collection of the items contained in this ComboBox. Wraps the System.Windows.Forms.ComboBox.Items property.
Declaration
public ComboBox.ObjectCollection Items { get; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.ComboBox.ObjectCollection |
ItemsText
Gets or sets the string that contains all items text.
Declaration
[Browsable(false)]
public string ItemsText { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MaxDropDownItems
Gets or sets the maximum number of items to be shown in the drop-down portion of the ComboBox. Wraps the System.Windows.Forms.ComboBox.MaxDropDownItems property.
Declaration
public int MaxDropDownItems { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
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 |
SelectedIndex
Gets or sets the index specifying the currently selected item. Wraps the System.Windows.Forms.ComboBox.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 |
SelectedItem
Gets or sets currently selected item in the ComboBox. Wraps the System.Windows.Forms.ComboBox.SelectedItem property.
Declaration
[Browsable(false)]
public object SelectedItem { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Sorted
Gets or sets a value indicating whether the items in the combo box are sorted. Wraps the System.Windows.Forms.ComboBox.Sorted property.
Declaration
public bool Sorted { 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
GetSelectionPoints()
Gets the object's selection points.
Declaration
protected override SelectionPoint[] GetSelectionPoints()
Returns
Type | Description |
---|---|
SelectionPoint[] | Array of SelectionPoint objects. |
Overrides
Remarks
Selection point is a small square displayed at the object's sides when object is selected in the designer. You can drag this square by the mouse to change the object's size. For example, the TextObject has eight selection points to change its width and height by the mouse.
If you are developing a new component for FastReport, you may override this method if your object has non-standard set of selection points. For example, if an object has something like "AutoSize" property, it would be good to disable all selection points if that property is true, to disable resizing of the object by the mouse.
GetValue()
Returns value entered in the control.
Declaration
protected override object GetValue()
Returns
Type | Description |
---|---|
System.Object | The value of type supported by this control. |
Overrides
Remarks
This method must return a value entered by the user. For example, TextBox control must return its Text property value. If this control supports multi-selection, return selected values in an array, for example string[] array for CheckedListBox.
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. |
OnLeave(EventArgs)
This method fires the Leave event and the script code connected to the LeaveEvent.
Declaration
public override void OnLeave(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | Event data. |
Overrides
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).
ShouldSerializeBackColor()
Determines whether is necessary to serialize the BackColor property.
Declaration
protected override bool ShouldSerializeBackColor()
Returns
Type | Description |
---|---|
System.Boolean | true if serialization is necessary. |
Overrides
ShouldSerializeForeColor()
Determines whether is necessary to serialize the ForeColor property.
Declaration
protected override bool ShouldSerializeForeColor()
Returns
Type | Description |
---|---|
System.Boolean | true if serialization is necessary. |
Overrides
Events
DrawItem
Occurs when a visual aspect of an owner-drawn ComboBox changes. Wraps the System.Windows.Forms.ComboBox.DrawItem event.
Declaration
public event DrawItemEventHandler DrawItem
Event Type
Type | Description |
---|---|
System.Windows.Forms.DrawItemEventHandler |
MeasureItem
Occurs each time an owner-drawn ComboBox item needs to be drawn and when the sizes of the list items are determined. Wraps the System.Windows.Forms.ComboBox.MeasureItem event.
Declaration
public event MeasureItemEventHandler MeasureItem
Event Type
Type | Description |
---|---|
System.Windows.Forms.MeasureItemEventHandler |
SelectedIndexChanged
Occurs after the selection has been changed. Wraps the System.Windows.Forms.ComboBox.SelectedIndexChanged event.
Declaration
public event EventHandler SelectedIndexChanged
Event Type
Type | Description |
---|---|
System.EventHandler |