HypernovaDesktop Components · docs
Binarymission
WinFormsCombo Box › BinaryTextComboBox

BinaryTextComboBox

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.ListControls

BinaryTextComboBox - Specialist ComboBox class for handling "Text only" data.

public class BinaryTextComboBox : BinaryComboBox, IMessageFilter

Inherits from / implements: BinaryComboBox, IMessageFilter

Remarks

BinaryTextComboBox class represents the specialist class for handling "Text only" data.
Whenever you want to handle text based data (i.e., not dealing with Image support alongside text), you can use this class.
If you need to use Images alongside the ComboBox text data, please use BinaryImageComboBox class.
BinaryTextComboBox class is a typical .NET ComboBox class, except that it provides the following additional features:-
1. Ability to fully support "Control painting" with custom colors.
Also, the control exposes properties to smoothen the colors when painting the control, its borders and its item hovering/selection colors.
2. Mouse hovering effects.
3. Direct support for ComboBox text "Auto-completion". (Refer AutoComplete for more details)
4. Multi-column Drop list. (Refer DropStyleIsMultiColumn for more details)

Members at a glance

BinaryTextComboBoxInitializes a new instance of BinaryTextComboBox class.
AlphaBlendingfactorForFilterAndGroupingPanelBackColorGets or sets the alpha blending factor to perform alpha blending of colors as described in the property EnableAlphaBlendingForFilterAndGroupingPanelBackColor.
AnimateDropDownWindowGets or sets whether to animate the multi-column drop-down window when it is closed.
AnimationIntervalGets or sets the animation interval to be used while closing the multi-column drop-down list.
AutoCompleteGets or sets whether an Auto completion of ComboBox text is needed.
AutoCompleteBasedOnCompleteMatchWithAnItemInTheListGets or sets whether to perform auto-completion of text based on the first item match from the available items, or to continue appending further suggestions based on other items of text which contain the user typed text.
AutoCompleteIsCaseSensitiveGets or sets whether the Auto completion feature is case sensitive.
AutoCompleteModeProvides a new implementation for the AutoCompleteMode.
AutoCompleteStyleForMultiColumnModeIsMultiColumnGets or sets whether the autocomplete dropdown style is multi-column style or the single column style.
BuiltinFilterOnNonStringTypeColumnFilterModeHow the built-in filter compares values in a column that does not hold text.
BuiltinFilterOnStringTypeColumnFilterModeHow the built-in filter compares values in a column that holds text.
BusyIndicatorTextGets or sets the text that is displayed in the control's text area when the control is processing a large amount of data for displaying in the multicolumn list window.
CSVFileSaveAsGets or sets the location where the CSV export file will be saved to, when the user requests that a given multi-column view data is saved to a CSV file.
ColumnDataTypeFormatInfoContainersGets or sets the column data type format info containers.
ColumnWidthsGets or sets the column widths of the column headers representing the columns to display from a given DataTable, when displaying a multi-column drop-list.
ColumnsToDisplayGets or sets a list of strings representing the columns to display from a given DataTable, when displaying a multi-column drop-list.
ComboBoxIsReadOnlyGets or sets whether the current instance of BinaryTextComboBox will be read-only or not.
CustomColumnNameForAutomaticRowSelectionGets or sets the name of the column (relevant only for the multi-column mode) that should be used as the column using which the multi-column list will search for the row item value for automatic row selection.
CustomComparerImplementorGets or sets the custom sorting implementation that you can provide to let the control to sort data in columns (while in multi-column drop list mode).
CustomDropDownWindowLocationPointGets or sets a custom screen coordinate at which to locate the drop-down window.
CustomPaintingColorRefer to the base class documentation CustomPaintingColor.
DataMemberGets or sets the column name from the associated data source, to be used for retrieving data when the DataSource property is set to a DataSet rather than anythig speicific like a DataTable or ArrayList etc.
DataSourceGets or sets the complex data-binding source - i.e. any source / object that implements any of these interfaces, viz., IList, IListSource or IBindingList.
DataSourceViewCustomSortingExpressionGets or sets the sorting expression to be used to sort and display the control.
DesiredFilterColumnGets or sets the filtering option in the multi-column mode.
DisplayMemberProvides a new implementation to the base DisplayMember property.
DisplayStyleIsFlatGets or sets whether to display/render the control as a "Flat" styled control.
DrawTheControlBasedOnWindowsOSGets or sets whether to automatically identify the current Windows OS and draw the control accordingly.
DropDownWindowBackgroundColorGets or sets the view window background color for the control's drop down window.
DropDownWindowDisplayOrientationGets or sets whether the drop-down window display is oriented to the left side or the right.
DropStyleIsMultiColumnGets or sets whether the drop-down data is displayed in a multi-column list style.
DroppedDownProvides a new implementation for the base class property.
EnableAlphaBlendingForFilterAndGroupingPanelBackColorGets or sets whether the color set in FilterAndGroupingPanelBackColor can be alpha-blended with Window, to provide a smooth color for rendering the filter/grouping options panel window.
EnableColumnSortingGets or sets whether to allow sorting of columns in the multi-column drop list window.
EnableDrawingHeaderFooterWhenInMultiColumnModeGets or sets whether to enable the extended header / footer areas, when displaying the drop-down window in multi-column display mode.
EnableUserColumnResizingGets or sets whether the user can resize the columns (i.e. the columns of a multi-column drop-list) at run-time.
EnforceItemsInListGets or sets whether to enforce user selection or typing-in of items only available form the control's current list of items.
FilterAndGroupingPanelBackColorGets or sets the color to use for rendering the background for the filter and grouping options panel, in the multicolumn mode.
FilteringIsONGets or sets the filtering option in the multi-column mode.
GroupItemsWhenInMultiColumnDisplayModeGets or sets whether to display the items in multi-column display mode in the "grouped" mode, or to display items using the default tabular / grid mode.
GroupMultiColumnDisplayModeDataBasedOnThisColumnGets or sets the column number to use from the associated DataSource data, to base the data grouping on. Refer to GroupItemsWhenInMultiColumnDisplayMode property for more details on grouping of the data.
HeadersToDisplayGets or sets a list of custom header strings representing the columns to display from a given DataTable, when displaying a multi-column drop-list.
IsAutoCompleteModeAppendSuggestInMultiColumnModeWhether auto-completion in multi-column mode both appends the completion to what has been typed and shows the suggestion list, rather than doing only one of the two.
IsCustomisationOfColumnDisplayEnabledInMultiColumnAutoSuggestModeGets or sets a value indicating whether customisation of column display is enabled in multi column auto-suggest mode.
IsFilterSearchResultBasedOnColumnDataTypeWhether the built-in filter compares values using each column's declared data type rather than comparing everything as text.
IsSourceDataPreSortedGets or sets a value indicating whether the control's source data is already sorted, and hence teh control should respect that sorted/ordered data when displaying it initially in its multi-column mode.
ItemSelectionClickGets or sets the mouse clicks required to select an item from a multi-column drop-down list.
KeepBindingContextInSyncWithParentGets or sets whether the multi-column mode combobox's data binding context should be in sync with the parent control (say for example, the hosting Form's) data binding context.
KeepTheFilterAndGroupingViewsCollapsedAtStartUpGets or sets a value indicating whether to keep the filter and grouping views (in multi-column mode) collapsed at start up.
KeepTheFilterAndGroupingViewsPaneFullyCollapsedAtStartupGets or sets whether to keep the grouping and filtering page cfully collapsed, so that the users can at run-time click the "Show Options panel button" located at the bottom of the drop-down window and view it fully for applying filters and/or grouping.
MultiColumnDefaultGroupedModeGroupSortingOrderGets or sets the default grouped mode group sorting order.
MultiColumnDropDownSizeGets or sets the size of the multi-column drop-down window, in logical (96 DPI) units.
MultiColumnDropDownWindowConfigurationDataGets or set instance of MultiColumnDropDownWindowConfiguration class, setup with the desired values for the drawing the header control that will display the multi-column drop-list window.
MultiColumnDropListBackColorGets or sets the backcolor for the Multi-column drop list view.
MultiColumnDropListFontGets or sets the multi-column drop list item font.
MultiColumnDropListForeColorGets or sets the forecolor for the Multi-column drop list view.
MultiColumnDropListGridLinesGets or sets whether the Multi-column drop list view has grid lines around cells.
MultiColumnDropListHoverSelectionGets or sets whether an item in the multi-column drop list view is automatically selected when the mouse pointer remains over the item for a few seconds.
MultiColumnDropListWindowIsResizableGets or sets whether the multi-column drop list window's border is sizable or not.
MultiColumnDroplistWindowAnimationStyleGets or sets the animation style for closing the multi-column dropdown window.
MultiColumnModeSourceDataSortedColumnIndexGets or sets the index of the source data sorted column.
MultiColumnViewBusyProcessingTextGets or sets the multi column view busy processing text.
MultiColumnViewNoDataFoundTextGets or sets the multi column view no data found text.
MultiColumnViewSortingGlyphColorGets or sets the color of the multi column view sorting glyph.
MultiColumnViewUIElementsTextProviderGets or sets an instance of MultiColumnViewUIElementsTextProvider class, to set localized values for various UI elements in the multi-column view window.
RaiseNotInListWhenTypingGets or sets whether to raise the NotInList event when the user is typing-in the text into the text area of the control.
SelectedIndexFromDropListGets or sets the currently selected DataRow index from the multi-column drop list.
SelectedValueGets or sets the value of the member property specified by the ValueMember property.
ShareCustomMultiColumnSizeAcrossDataListAndFilterGroupingOptionsPaneWhether a width the user sets on the multi-column list also applies to the filter and grouping options pane, so the two stay the same width.
ShouldAllowDragDropOfColumnsGets or sets whether to allow users to drag and drop columns in the multi-column drop-list window.
ShouldAllowUserInputWhileProcessingMultiColumnAutoCompleDropDownViewGets or sets a value indicating whether the should allow user input while still showing and processing the multi column auto-complete drop down view.
ShouldPersistUserSetColumnWidthsAcrossFilterSessionsWhether column widths the user has dragged survive a filter being applied and cleared, rather than reverting to the calculated widths.
ShowDropDownMultiColumnWindowAfterAdjustingForVirtualAvaliableScreenSpaceGets or sets whether to adjust the display location of the drop-down (multi-column) window, when the BinaryTextComboBox control is positioned in the form in such a location that when the container (say, the Form) is run, there is no available space to display the drop-down multi-column window completely.
ShowEmptyDropListViewWhenThereAreNoDataGets or sets as to whether to show an empty drop-list window when the user clicks on the combobox drop-down button, and there is no data to display.
ShowFilterOptionsInMultiColumnModeGets or sets whether to show the "filter and grouping" options window, when in multi-column mode.
SizeForMultiColumnAutoCompleteSuggestionDropDownWindowGets or sets a custom size for the auto-completion suggestion list drop-down window.
SizesForMultiColumnAutoCompleteSuggestionDropDownWindowColumnsGets or sets the sizes for multi-column auto-complete suggestion drop-down window columns.
TableToLoadGets or sets a DataTable as the DataSource to load the data from, when displaying a multi-column drop-list.
ValueMemberProvides a new implementation to the base ValueMember property.
CloseMultiColumnDropDownListWindowCloses the multi-column drop-down if it is open. Safe to call when it is not.
DisposeRefer to base class documentation.
GetRowDataStringReturns the display text for one row of the bound data source, formatted according to the column's data type settings.
GetTheColumnValueGets the column value from the attached DataSource data source, based on a given row index and a column name.
MakeBlank// Gets or sets a value indicating whether the control will display blank text to start with, until the user selects an item from the drop-down list. //
OnDropDownRefer to base class documentation.
OnKeyDownRaises the KeyDown event. BinaryTextComboBox overrides it so the control's own handling runs alongside the base behavior.
OnKeyUpRefer to base class documentation.
OnLeaveRefer to base class documentation.
OnSelectedIndexChangedRefer to base class documentation.
OnTextChangedRaises the TextChanged event. BinaryTextComboBox overrides it so the control's own handling runs alongside the base behavior.
PaintControlWithDataThis is a specialist painting override. Do not override this method with any special/custom code.
PreFilterMessageSees Windows messages before they reach their target, which is how the control notices a click outside its drop-down and closes it.
RefreshPaintThis is a specialist painting override. Do not override this method with any special/custom code.
SetDataThis is a specialist painting override. Do not override this method with any special/custom code.
WndProcRefer to base class documentation.
AutoCompletingTHis event is raised just before the automatic auto completion is about to be performed (i.e. if the property AutoComplete has been set to true).
CustomSortingThis event is raised when a column is clicked in the multi-column drop list window.
DropDownAboutToBeShownThis event is raised when the user clicks on the combobox and the drop-list window is about to be displayed.
NotInListThis event is raised whenever the user types-in a text in the control's text area and tabs to a different control (i.e. when the control's Leave event occurs) and the user-typed text does not match any items in the current list of items in the control's list.

Constructors

BinaryTextComboBox

public BinaryTextComboBox()

Initializes a new instance of BinaryTextComboBox class.

Properties

AlphaBlendingfactorForFilterAndGroupingPanelBackColor

public int AlphaBlendingfactorForFilterAndGroupingPanelBackColor

Gets or sets the alpha blending factor to perform alpha blending of colors as described in the property EnableAlphaBlendingForFilterAndGroupingPanelBackColor.

The default value is 150.

AnimateDropDownWindow

public bool AnimateDropDownWindow

Gets or sets whether to animate the multi-column drop-down window when it is closed.

If you set this property to true, the default animation interval will be set to 100 milliseconds.
You can set your chosen timer interval for animation, by setting the property AnimationInterval.

AnimationInterval

public int AnimationInterval

Gets or sets the animation interval to be used while closing the multi-column drop-down list.

Refer AnimateDropDownWindow for more details.

AutoComplete

public bool AutoComplete

Gets or sets whether an Auto completion of ComboBox text is needed.

Value. A bool value.

BinaryTextComboBox class provides the capability to perform AutoCompletion of text (i.e., completing the text in the Combobox as you type in a text into the combobox window).
This feature is available only when the instance's ComboBoxStyle property is set to DropDown.

By default, this property is set to true. If you need to disable the auto-completion feature, simply set this property to false.

AutoCompleteBasedOnCompleteMatchWithAnItemInTheList

public bool AutoCompleteBasedOnCompleteMatchWithAnItemInTheList

Gets or sets whether to perform auto-completion of text based on the first item match from the available items, or to continue appending further suggestions based on other items of text which contain the user typed text.

The default value is false .

AutoCompleteIsCaseSensitive

public bool AutoCompleteIsCaseSensitive

Gets or sets whether the Auto completion feature is case sensitive.

Value. A bool value.

BinaryTextComboBox class provides the capability to perform AutoCompletion of text (i.e., completing the text in the Combobox as you type in a text into the combobox window).

By default, the AutoComplete feature is case-sensitive and hence this property is set to true. If you need the Auto completion feature without case-sensitiveness, simply set this property to false.

AutoCompleteMode

public new AutoCompleteMode AutoCompleteMode

Provides a new implementation for the AutoCompleteMode.

AutoCompleteStyleForMultiColumnModeIsMultiColumn

public bool AutoCompleteStyleForMultiColumnModeIsMultiColumn

Gets or sets whether the autocomplete dropdown style is multi-column style or the single column style.

If this property is set to true, then when typing characters into the text area, a drop-list window will show up displaying the appropriate items in the multi-column mode, for selection.
If you set this property to false, the control will display the autocompletion list as a single column list - i.e. will display only the relevant values as is available from the DisplayMember column, and not from all columns.

BuiltinFilterOnNonStringTypeColumnFilterMode

public BuiltinFilterOnNonStringTypeColumnFilterResultsMode BuiltinFilterOnNonStringTypeColumnFilterMode

How the built-in filter compares values in a column that does not hold text.

BuiltinFilterOnStringTypeColumnFilterMode

public BuiltinFilterOnNonStringTypeColumnFilterResultsMode BuiltinFilterOnStringTypeColumnFilterMode

How the built-in filter compares values in a column that holds text.

BusyIndicatorText

public string BusyIndicatorText

Gets or sets the text that is displayed in the control's text area when the control is processing a large amount of data for displaying in the multicolumn list window.

CSVFileSaveAs

public string CSVFileSaveAs

Gets or sets the location where the CSV export file will be saved to, when the user requests that a given multi-column view data is saved to a CSV file.

The user will not be able to specify the file location himself, when in multi-column view mode, and hence the developer will ahve to supply this file save location ahead of time - i.e. before the user gets into the multi-column mode.

ColumnDataTypeFormatInfoContainers

public List<ColumnDataTypeFormatInfoContainer> ColumnDataTypeFormatInfoContainers

Gets or sets the column data type format info containers.

ColumnWidths

public int [] ColumnWidths

Gets or sets the column widths of the column headers representing the columns to display from a given DataTable, when displaying a multi-column drop-list.

Value. A int array.

This property lets you set a custom column header width for each of the displayed custom headers for the DataTable columns to display in the drop-down list, when displaying a multi-column drop-list of data.
The following code example (in C# .NET) will illustrate the usage of this property and other associated properties in order to display a multi-column list drop down. DataTable theTable = new DataTable("Customers"); theTable.Columns.Add("Country",typeof(System.String)); theTable.Columns.Add("Platform",typeof(System.String)); theTable.Columns.Add("Revenue",typeof(System.String)); DataRow theRow = theTable.NewRow(); theRow["Country"] = "USA"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "$100,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "U.K"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "£300,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "USA"; theRow["Platform"] = "COM+"; theRow["Revenue"] = "$550,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "New Zealand"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "$1100,000"; theTable.Rows.Add(theRow); BinaryTextComboBox txtCmbBx = new BinaryTextComboBox(); txtCmbBx.DataSource = theTable; txtCmbBx.DisplayMember = "Revenue"; txtCmbBx.ValueMember = "Country"; txtCmbBx.SelectedValue = "USA"; txtCmbBx.ColumnsToDisplay = new string[]{"Country","Platform","Revenue"}; txtCmbBx.HeadersToDisplay = new string[]{"Country name","Platform used","Revenue earned"}; txtCmbBx.MultiColumnDropListBackColor = Color.LightGreen; txtCmbBx.MultiColumnDropListForeColor = Color.DarkGreen; txtCmbBx.MultiColumnDropListGridLines = true; txtCmbBx.MultiColumnDropListHoverSelection = true; txtCmbBx.MultiColumnDropListFont = new Font("Times New Roman", (float)(11.0)); int [] intary = {15,15,25}; txtCmbBx.ColumnWidths = intary; txtCmbBx.DropStyleIsMultiColumn = true;

ColumnsToDisplay

public string[] ColumnsToDisplay

Gets or sets a list of strings representing the columns to display from a given DataTable, when displaying a multi-column drop-list.

Value. A string array.

This property decides the DataTable columns to display in the drop-down list, when displaying a multi-column drop-list of data.
The following code example (in C# .NET) will illustrate the usage of this property and other associated properties in order to display a multi-column list drop down. DataTable theTable = new DataTable("Customers"); theTable.Columns.Add("Country",typeof(System.String)); theTable.Columns.Add("Platform",typeof(System.String)); theTable.Columns.Add("Revenue",typeof(System.String)); DataRow theRow = theTable.NewRow(); theRow["Country"] = "USA"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "$100,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "U.K"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "£300,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "USA"; theRow["Platform"] = "COM+"; theRow["Revenue"] = "$550,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "New Zealand"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "$1100,000"; theTable.Rows.Add(theRow); BinaryTextComboBox TxtCmbBx = new BinaryTextComboBox(); TxtCmbBx.DataSource = theTable; TxtCmbBx.DisplayMember = "Country"; TxtCmbBx.ColumnsToDisplay = new string[]{"Country","Platform","Revenue"}; TxtCmbBx.DropStyleIsMultiColumn = true;
Here you can see that the DisplayMember property is set to one particular Column of the DataTable. Based on the above, when the user clicks the drop-down button of the control, a multi-column drop-down list will be displayed with the above set data, and once the user selects a data item from the list, the corresponding DisplayMember value of the user selected item will be set as the BinaryTextComboBox text value.

ComboBoxIsReadOnly

public bool ComboBoxIsReadOnly

Gets or sets whether the current instance of BinaryTextComboBox will be read-only or not.

Value. A Bool value.

BinaryTextComboBox object allows you to have a ReadOnly (with dropdown style) combobox object for your applications.
Which means, your users can copy the combobox text to clipboard (from its edit window), but won't be able to edit it.
By default, this property is set to false.

CustomColumnNameForAutomaticRowSelection

public string CustomColumnNameForAutomaticRowSelection

Gets or sets the name of the column (relevant only for the multi-column mode) that should be used as the column using which the multi-column list will search for the row item value for automatic row selection.

By default, the control will use the first column data for this purpose.

CustomComparerImplementor

public IComparer CustomComparerImplementor

Gets or sets the custom sorting implementation that you can provide to let the control to sort data in columns (while in multi-column drop list mode).

Refer to the delegate CustomSortingHandler for detailed discussion on the usage.

CustomDropDownWindowLocationPoint

public Point CustomDropDownWindowLocationPoint

Gets or sets a custom screen coordinate at which to locate the drop-down window.

Ensure you set a coordinate relative to the screen.

CustomPaintingColor

public new Color CustomPaintingColor

Refer to the base class documentation CustomPaintingColor.

DataMember

public string DataMember

Gets or sets the column name from the associated data source, to be used for retrieving data when the DataSource property is set to a DataSet rather than anythig speicific like a DataTable or ArrayList etc.

DataSource

public new object DataSource

Gets or sets the complex data-binding source - i.e. any source / object that implements any of these interfaces, viz., IList, IListSource or IBindingList.

Note that when you set this property with a DataSet object, ensure you also set the DataMember property that needs to be used to pick up the relevant DataTable from the given DataSet object.
If you do not set the DataMember property when you associate a DataSet object as the DataSource, then control will automatically attempt to use the first table in the DataSet (if there is one available) as the DataMember value, to populate the multi-column data.

DataSourceViewCustomSortingExpression

public string DataSourceViewCustomSortingExpression

Gets or sets the sorting expression to be used to sort and display the control.

This property will be effective only for the control's multi-column mode.

DesiredFilterColumn

public int DesiredFilterColumn

Gets or sets the filtering option in the multi-column mode.

DisplayMember

public new string DisplayMember

Provides a new implementation to the base DisplayMember property.

DisplayStyleIsFlat

public new bool DisplayStyleIsFlat

Gets or sets whether to display/render the control as a "Flat" styled control.

The default value is true. If you want to display the control emulating the standard Windows style combobox control, set this property to false.
Note:This property will not have any effect when DrawTheControlBasedOnWindowsOS is set to true.

DrawTheControlBasedOnWindowsOS

public bool DrawTheControlBasedOnWindowsOS

Gets or sets whether to automatically identify the current Windows OS and draw the control accordingly.

If set to true, the control will draw itself with "flat" style only if the current Windows OS is XP, not otherwise.
If you need to draw the control with its "flat" style irrespective of the Windows OS or if you have a need to switch between "flat" and "non-flat" style modes of the control deterministically, then set this property to false and use the DisplayStyleIsFlat property accordingly.

DropDownWindowBackgroundColor

public new Color DropDownWindowBackgroundColor

Gets or sets the view window background color for the control's drop down window.

DropDownWindowDisplayOrientation

public DropDownWindowDisplayOrientation DropDownWindowDisplayOrientation

Gets or sets whether the drop-down window display is oriented to the left side or the right.

DropStyleIsMultiColumn

public bool DropStyleIsMultiColumn

Gets or sets whether the drop-down data is displayed in a multi-column list style.

Value. A bool value.

BinaryTextComboBox class provides the capability to display its drop-down list as a multi-column list, from which you can select a data item, and then that item can be set as the text into the ComboBox window.
To enable this feature, you must set the following properties:-
1. DataSource
2. ValueMember
3. DisplayMember
Once you have set these properties to valid values, the control is instantly enabled with a multi-column style drop-down list, which will be visible when the user clicks on the control's drop-down button.

Note: This feature is available only with the BinaryTextComboBox class. By default, this property is set to false. If you need to enable this feature, simply set this property to true .
The control supports using multi-column drop style with DropDown style as well!

DroppedDown

public new bool DroppedDown

Provides a new implementation for the base class property.

EnableAlphaBlendingForFilterAndGroupingPanelBackColor

public bool EnableAlphaBlendingForFilterAndGroupingPanelBackColor

Gets or sets whether the color set in FilterAndGroupingPanelBackColor can be alpha-blended with Window, to provide a smooth color for rendering the filter/grouping options panel window.

The default value is false .

EnableColumnSorting

public bool EnableColumnSorting

Gets or sets whether to allow sorting of columns in the multi-column drop list window.

If set to true, the columns headers can be clicked to sort the column data. If set to false, the column headers cannot be clicked.

EnableDrawingHeaderFooterWhenInMultiColumnMode

public bool EnableDrawingHeaderFooterWhenInMultiColumnMode

Gets or sets whether to enable the extended header / footer areas, when displaying the drop-down window in multi-column display mode.

EnableUserColumnResizing

public bool EnableUserColumnResizing

Gets or sets whether the user can resize the columns (i.e. the columns of a multi-column drop-list) at run-time.

Default value is true. If you want to disable user column resizing, set this property to false.

EnforceItemsInList

public bool EnforceItemsInList

Gets or sets whether to enforce user selection or typing-in of items only available form the control's current list of items.

If you set this property to true, then whenever the users types-in a text into the control's text area, the control will search its list of items and if the user typed-in text is not available in the current list of items in the control, the control will raise the NotInList event, which you can handle accordingly using NotInListHandler delegate.

FilterAndGroupingPanelBackColor

public Color FilterAndGroupingPanelBackColor

Gets or sets the color to use for rendering the background for the filter and grouping options panel, in the multicolumn mode.

FilteringIsON

public bool FilteringIsON

Gets or sets the filtering option in the multi-column mode.

GroupItemsWhenInMultiColumnDisplayMode

public bool GroupItemsWhenInMultiColumnDisplayMode

Gets or sets whether to display the items in multi-column display mode in the "grouped" mode, or to display items using the default tabular / grid mode.

The default value is false

GroupMultiColumnDisplayModeDataBasedOnThisColumn

public int GroupMultiColumnDisplayModeDataBasedOnThisColumn

Gets or sets the column number to use from the associated DataSource data, to base the data grouping on. Refer to GroupItemsWhenInMultiColumnDisplayMode property for more details on grouping of the data.

HeadersToDisplay

public string[] HeadersToDisplay

Gets or sets a list of custom header strings representing the columns to display from a given DataTable, when displaying a multi-column drop-list.

Value. A string array.

This property lets you display custom header strings for the DataTable columns to display in the drop-down list, when displaying a multi-column drop-list of data.
The following code example (in C# .NET) will illustrate the usage of this property and other associated properties in order to display a multi-column list drop down. DataTable theTable = new DataTable("Customers"); theTable.Columns.Add("Country",typeof(System.String)); theTable.Columns.Add("Platform",typeof(System.String)); theTable.Columns.Add("Revenue",typeof(System.String)); DataRow theRow = theTable.NewRow(); theRow["Country"] = "USA"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "$100,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "U.K"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "£300,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "USA"; theRow["Platform"] = "COM+"; theRow["Revenue"] = "$550,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "New Zealand"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "$1100,000"; theTable.Rows.Add(theRow); BinaryTextComboBox txtCmbBx = new BinaryTextComboBox(); txtCmbBx.DataSource = theTable; txtCmbBx.DisplayMember = "Country"; txtCmbBx.ColumnsToDisplay = new string[]{"Country","Platform","Revenue"}; txtCmbBx.HeadersToDisplay = new string[]{"Country name","Platform used","Revenue earned"}; txtCmbBx.DropStyleIsMultiColumn = true;
Here you can see that the DisplayMember property is set to one particular Column of the DataTable. Based on the above, when the user clicks the drop-down button of the control, a multi-column drop-down list will be displayed with the above set data, and once the user selects a data item from the list, the corresponding DisplayMember value of the user selected item will be set as the BinaryTextComboBox text value.

IsAutoCompleteModeAppendSuggestInMultiColumnMode

public bool IsAutoCompleteModeAppendSuggestInMultiColumnMode

Whether auto-completion in multi-column mode both appends the completion to what has been typed and shows the suggestion list, rather than doing only one of the two.

IsCustomisationOfColumnDisplayEnabledInMultiColumnAutoSuggestMode

public bool IsCustomisationOfColumnDisplayEnabledInMultiColumnAutoSuggestMode

Gets or sets a value indicating whether customisation of column display is enabled in multi column auto-suggest mode.

IsFilterSearchResultBasedOnColumnDataType

public bool IsFilterSearchResultBasedOnColumnDataType

Whether the built-in filter compares values using each column's declared data type rather than comparing everything as text.

IsSourceDataPreSorted

public bool IsSourceDataPreSorted

Gets or sets a value indicating whether the control's source data is already sorted, and hence teh control should respect that sorted/ordered data when displaying it initially in its multi-column mode.

ItemSelectionClick

public ItemSelectionClick ItemSelectionClick

Gets or sets the mouse clicks required to select an item from a multi-column drop-down list.

When selecting an item from the multi-column drop-down list, by setting this property, you can choose to let your users to use either a single-mouse-click or a double-mouse-click.
By default, the selection click is set to ItemSelectionClick.DoubleClick.
For more details, please refer the enumeration ItemSelectionClick.

KeepBindingContextInSyncWithParent

public bool KeepBindingContextInSyncWithParent

Gets or sets whether the multi-column mode combobox's data binding context should be in sync with the parent control (say for example, the hosting Form's) data binding context.

This property will be effective only for the control's multi-column mode.

KeepTheFilterAndGroupingViewsCollapsedAtStartUp

public bool KeepTheFilterAndGroupingViewsCollapsedAtStartUp

Gets or sets a value indicating whether to keep the filter and grouping views (in multi-column mode) collapsed at start up.

Value. true if to keep the filter and grouping views (in multi-column mode) collapsed at start up; otherwise, false .

KeepTheFilterAndGroupingViewsPaneFullyCollapsedAtStartup

public bool KeepTheFilterAndGroupingViewsPaneFullyCollapsedAtStartup

Gets or sets whether to keep the grouping and filtering page cfully collapsed, so that the users can at run-time click the "Show Options panel button" located at the bottom of the drop-down window and view it fully for applying filters and/or grouping.

MultiColumnDefaultGroupedModeGroupSortingOrder

public SortOrder MultiColumnDefaultGroupedModeGroupSortingOrder

Gets or sets the default grouped mode group sorting order.

MultiColumnDropDownSize

public Size MultiColumnDropDownSize

Gets or sets the size of the multi-column drop-down window, in logical (96 DPI) units.

Empty, the default, sizes the window to show every column in full and about a dozen rows. Any other value is the size to open at, scaled to the display the combo box is on - like every metric in the suite, a value in a form's designer file keeps meaning what it meant at 100%. Either way the window is kept within the working area of that display, and opens above the combo box when there is more room there. When the user resizes the window, the size they chose is stored here, in logical units, and the next open uses it.

MultiColumnDropDownWindowConfigurationData

public MultiColumnDropDownWindowConfiguration MultiColumnDropDownWindowConfigurationData

Gets or set instance of MultiColumnDropDownWindowConfiguration class, setup with the desired values for the drawing the header control that will display the multi-column drop-list window.

MultiColumnDropListBackColor

public Color MultiColumnDropListBackColor

Gets or sets the backcolor for the Multi-column drop list view.

This feature works only if the current drop style is set to Multi-column view. Refer DropStyleIsMultiColumn property for more details.

MultiColumnDropListFont

public Font MultiColumnDropListFont

Gets or sets the multi-column drop list item font.

MultiColumnDropListForeColor

public Color MultiColumnDropListForeColor

Gets or sets the forecolor for the Multi-column drop list view.

This feature works only if the current drop style is set to Multi-column view. Refer DropStyleIsMultiColumn property for more details.

MultiColumnDropListGridLines

public bool MultiColumnDropListGridLines

Gets or sets whether the Multi-column drop list view has grid lines around cells.

This feature works only if the current drop style is set to Multi-column view. Refer DropStyleIsMultiColumn property for more details.

MultiColumnDropListHoverSelection

public bool MultiColumnDropListHoverSelection

Gets or sets whether an item in the multi-column drop list view is automatically selected when the mouse pointer remains over the item for a few seconds.

This feature works only if the current drop style is set to Multi-column view. Refer DropStyleIsMultiColumn property for more details.

MultiColumnDropListWindowIsResizable

public bool MultiColumnDropListWindowIsResizable

Gets or sets whether the multi-column drop list window's border is sizable or not.

The default value is true.

MultiColumnDroplistWindowAnimationStyle

public MultiColumnDroplistWindowAnimationStyle MultiColumnDroplistWindowAnimationStyle

Gets or sets the animation style for closing the multi-column dropdown window.

If you want to set this property to MultiColumnDroplistWindowAnimationStyle.Vanish or MultiColumnDroplistWindowAnimationStyle.ReSize, then set the AnimateDropDownWindow to true.

MultiColumnModeSourceDataSortedColumnIndex

public int MultiColumnModeSourceDataSortedColumnIndex

Gets or sets the index of the source data sorted column.

Value. The index of the source data sorted column.

MultiColumnViewBusyProcessingText

public string MultiColumnViewBusyProcessingText

Gets or sets the multi column view busy processing text.

Value. The multi column view busy processing text.

MultiColumnViewNoDataFoundText

public string MultiColumnViewNoDataFoundText

Gets or sets the multi column view no data found text.

Value. The multi column view no data found text.

MultiColumnViewSortingGlyphColor

public Color MultiColumnViewSortingGlyphColor

Gets or sets the color of the multi column view sorting glyph.

Value. The color of the multi column view sorting glyph.

MultiColumnViewUIElementsTextProvider

public MultiColumnViewUIElementsTextProvider MultiColumnViewUIElementsTextProvider

Gets or sets an instance of MultiColumnViewUIElementsTextProvider class, to set localized values for various UI elements in the multi-column view window.

RaiseNotInListWhenTyping

public bool RaiseNotInListWhenTyping

Gets or sets whether to raise the NotInList event when the user is typing-in the text into the text area of the control.

By default, th event NotInList is raised when the user types in some text into the control and moves out of the control by hitting the TAB key (thereby losing focus out of control). If you want the event to be raised as and when the user types in text into the control and the control's list does not have an item that is so far typed in by the user, then set this property to true. The control will then raise the NotInList event as and when the user types in text and it is not found in the control's list of item data.
By default, the value of this property is false.

SelectedIndexFromDropList

public int SelectedIndexFromDropList

Gets or sets the currently selected DataRow index from the multi-column drop list.

Value. An integer value.

When the user selects a row from the multi-column drop list, this property is updated with that data row's index, which you can use in your SelectedIndexChanged event to identify which row in the DataTable (associated with the multi-column drop list) has been selected by the user.

With version 2, BinaryTextComboBox class supports the DropDown combobox style, so that it allows your users to type in text into the combobox.
Note: When using the control in Multi-style drop list mode, never use the standard SelectedIndex property. Use only the SelectedIndexFromDropList property instead.
But of course to capture the event of item selection, use the standard SelectedIndexChanged event.

SelectedValue

public new object SelectedValue

Gets or sets the value of the member property specified by the ValueMember property.

ShareCustomMultiColumnSizeAcrossDataListAndFilterGroupingOptionsPane

public bool ShareCustomMultiColumnSizeAcrossDataListAndFilterGroupingOptionsPane

Whether a width the user sets on the multi-column list also applies to the filter and grouping options pane, so the two stay the same width.

ShouldAllowDragDropOfColumns

public bool ShouldAllowDragDropOfColumns

Gets or sets whether to allow users to drag and drop columns in the multi-column drop-list window.

Note: There is a trade-off with this property. If you want to enable the drag-and-drop of columns by user, then then the out-of-the-box fix provided in the control for removing the last blank column header in the multi-column drop-list window will not be available (this is a standard bug in the Windows Listview control).

ShouldAllowUserInputWhileProcessingMultiColumnAutoCompleDropDownView

public bool ShouldAllowUserInputWhileProcessingMultiColumnAutoCompleDropDownView

Gets or sets a value indicating whether the should allow user input while still showing and processing the multi column auto-complete drop down view.

ShouldPersistUserSetColumnWidthsAcrossFilterSessions

public bool ShouldPersistUserSetColumnWidthsAcrossFilterSessions

Whether column widths the user has dragged survive a filter being applied and cleared, rather than reverting to the calculated widths.

ShowDropDownMultiColumnWindowAfterAdjustingForVirtualAvaliableScreenSpace

public bool ShowDropDownMultiColumnWindowAfterAdjustingForVirtualAvaliableScreenSpace

Gets or sets whether to adjust the display location of the drop-down (multi-column) window, when the BinaryTextComboBox control is positioned in the form in such a location that when the container (say, the Form) is run, there is no available space to display the drop-down multi-column window completely.

This property is relevant only when the BinaryTextComboBox is run with DropStyleIsMultiColumn property set to "true".

ShowEmptyDropListViewWhenThereAreNoData

public bool ShowEmptyDropListViewWhenThereAreNoData

Gets or sets as to whether to show an empty drop-list window when the user clicks on the combobox drop-down button, and there is no data to display.

ShowFilterOptionsInMultiColumnMode

public bool ShowFilterOptionsInMultiColumnMode

Gets or sets whether to show the "filter and grouping" options window, when in multi-column mode.

SizeForMultiColumnAutoCompleteSuggestionDropDownWindow

public Size SizeForMultiColumnAutoCompleteSuggestionDropDownWindow

Gets or sets a custom size for the auto-completion suggestion list drop-down window.

If this property is not set, a default size will be provided and used.
Refer to the related property AutoCompleteStyleForMultiColumnModeIsMultiColumn.

SizesForMultiColumnAutoCompleteSuggestionDropDownWindowColumns

public int[] SizesForMultiColumnAutoCompleteSuggestionDropDownWindowColumns

Gets or sets the sizes for multi-column auto-complete suggestion drop-down window columns.

TableToLoad

public DataTable TableToLoad

Gets or sets a DataTable as the DataSource to load the data from, when displaying a multi-column drop-list.

Value. A DataTable object.

This property decides from where to load the data from, when displaying a multi-column drop-list.
Please refer to a detailed code example in ColumnsToDisplay, which illustrates the usage of this property as well as other related properties.
NOTE: This property is a legacy property and is deprecated. Use the control's DataSource property instead, which can accept all sorts of data sources that implement IList, IListSource or IBindingList interfaces.

ValueMember

public new string ValueMember

Provides a new implementation to the base ValueMember property.

Methods

CloseMultiColumnDropDownListWindow

public void CloseMultiColumnDropDownListWindow()

Closes the multi-column drop-down if it is open. Safe to call when it is not.

Dispose

protected override void Dispose(bool disposing)

Refer to base class documentation.

GetRowDataString

protected string GetRowDataString(int index)

Returns the display text for one row of the bound data source, formatted according to the column's data type settings.

index
The row to read.

Returns. The text to draw for that row.

GetTheColumnValue

public string GetTheColumnValue(int desiredRowIndex, string desiredColumnName)

Gets the column value from the attached DataSource data source, based on a given row index and a column name.

desiredRowIndex
Specify the zero-based index of the desired row from the attached DataSource / DataSource.
desiredColumnName
Specify the desired column name from the attached DataSource / DataSource.

MakeBlank

public new void MakeBlank()

// Gets or sets a value indicating whether the control will display blank text to start with, until the user selects an item from the drop-down list. //

Note that this feature is applicable only when the control is in its multi-column drop-list mode, and is data-bound.

OnDropDown

protected override void OnDropDown(System.EventArgs e)

Refer to base class documentation.

OnKeyDown

protected override void OnKeyDown(KeyEventArgs e)

Raises the KeyDown event. BinaryTextComboBox overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnKeyUp

protected override void OnKeyUp(System.Windows.Forms.KeyEventArgs e)

Refer to base class documentation.

OnLeave

protected override void OnLeave(EventArgs e)

Refer to base class documentation.

OnSelectedIndexChanged

protected override void OnSelectedIndexChanged(EventArgs e)

Refer to base class documentation.

OnTextChanged

protected override void OnTextChanged(EventArgs te)

Raises the TextChanged event. BinaryTextComboBox overrides it so the control's own handling runs alongside the base behavior.

te
The data for the event.

PaintControlWithData

protected override void PaintControlWithData(Graphics g, Rectangle bounds, int Index, bool ifSelected, bool toEdit)

This is a specialist painting override. Do not override this method with any special/custom code.

PreFilterMessage

public bool PreFilterMessage(ref Message m)

Sees Windows messages before they reach their target, which is how the control notices a click outside its drop-down and closes it.

m
The message about to be dispatched.

Returns. true to stop the message being dispatched.

RefreshPaint

protected override void RefreshPaint(Graphics g, Rectangle bounds, int Index, bool ifSelected, bool toEdit)

This is a specialist painting override. Do not override this method with any special/custom code.

SetData

protected override void SetData()

This is a specialist painting override. Do not override this method with any special/custom code.

WndProc

protected override void WndProc(ref System.Windows.Forms.Message m)

Refer to base class documentation.

Events

AutoCompleting

public event AutoCompletingHandler AutoCompleting

THis event is raised just before the automatic auto completion is about to be performed (i.e. if the property AutoComplete has been set to true).

CustomSorting

public event CustomSortingHandler CustomSorting

This event is raised when a column is clicked in the multi-column drop list window.

Refer to the delegate CustomSortingHandler for detailed discussion on the usage.
Note: To be able to use this event, the EnableColumnSorting property must have been set to true.

DropDownAboutToBeShown

public event DropDownProcessHandler DropDownAboutToBeShown

This event is raised when the user clicks on the combobox and the drop-list window is about to be displayed.

Refer to the delegate DropDownProcessHandler for more details.

NotInList

public event NotInListHandler NotInList

This event is raised whenever the user types-in a text in the control's text area and tabs to a different control (i.e. when the control's Leave event occurs) and the user-typed text does not match any items in the current list of items in the control's list.