HypernovaDesktop Components · docs
Binarymission
WinForms › Combo Box

Combo Box

.NET Framework 4.8.NET 6 / 8 / 10v9.0.0WinForms

The shared base of BinaryTextComboBox and BinaryImageComboBox: a Windows Forms combo box that draws its own flat border, drop-down button and items, in colours you choose.

26public types
307public members
1namespaces

Assembly

AssemblyBinarymission.WinForms.Controls.BinaryComboBox.dll
Root namespaceBinarymission.WinForms.Controls.ListControls
Target frameworks.NET Framework 4.8, .NET 6 / 8 / 10

Overview

What it is for

Everything the two Hypernova combo boxes have in common lives here: the colours of the border, the drop-down button and the highlighted item, how the border behaves when the pointer and the focus come and go, the optional push-button style drop-down button, the look of the single-column drop-down list, and the extended read-only mode. The class is abstract and is not in the Toolbox; place a BinaryTextComboBox (text, data binding, auto-completion, a multi-column drop-down) or a BinaryImageComboBox (an image beside each item, drive and font lists) on the form instead.

Colours

Two colours drive the whole look. CustomControlBorderColor is the border and the outline round the drop-down button. CustomPaintingColor is blended with the window colour to give the drop-down button face and the highlighted item, and blended again for the button while the list is open. The three alpha-blending factors (0 to 255) say how much of it goes into each blend: AlphaBlendFactorForItemSelectionColor, AlphaBlendFactorForDropDownPressedColor and AlphaBlendFactorForControlPainting. EmulateThisXPTheme sets all five at once to one of the Windows XP colour schemes.

The border

With ShowBorderAlways on (the default) the border is always drawn; CustomControlBorderColorWhenNotInFocus gives it a quieter colour while the control does not have the focus. With it off, the border appears only while the pointer is over the control or it has the focus.

Things to know

Getting started

A text combo box in the application's accent colour, with a quiet grey border while it does not have the focus.

var statusPicker = new BinaryTextComboBox
{
    Location = new Point(12, 12),
    Width = 220,
    DropDownStyle = ComboBoxStyle.DropDownList,
};
statusPicker.Items.AddRange(new object[] { "Open", "In progress", "On hold", "Closed" });
statusPicker.SelectedIndex = 0;

statusPicker.CustomPaintingColor = Color.FromArgb(0, 120, 215);
statusPicker.CustomControlBorderColor = Color.FromArgb(0, 90, 158);
statusPicker.CustomControlBorderColorWhenNotInFocus = Color.Silver;
statusPicker.AlphaBlendFactorForItemSelectionColor = 90;   // a light tint for the highlighted item
statusPicker.ControlArrowColor = Color.FromArgb(0, 90, 158);

statusPicker.SelectedIndexChanged += (sender, e) => Text = "Status: " + statusPicker.SelectedItem;
Controls.Add(statusPicker);

API reference

Binarymission.WinForms.Controls.ListControls

class BinaryComboBoxThe shared base of BinaryTextComboBox and BinaryImageComboBox: a Windows Forms combo box that draws its own flat border, drop-down button and items, in colours you choose.
class BinaryComboBoxColumnA DataGridView column whose cells are edited with a BinaryTextComboBox - so a grid cell can offer the multi-column drop-down, its sorting, grouping and filtering, and the Hypernova look.
class BinaryImageComboBoxA pick-list combo box that shows an image beside each item - and can turn itself into a ready-made drive list or font list.
class DriveInformationDetails of one entry of a BinaryImageComboBox drive list: its path, volume label, display name and type, and the file-system limits Windows reports for it.
delegate DriveSelectionChangeHandlerRepresents the method that handles DriveSelectionChanged.
delegate DropDownProcessHandlerRepresents the method that handles DropDownAboutToBeShown, and can stop the list opening.
class BinaryTextComboBoxA text combo box that adds auto-completion, a read-only mode, and a multi-column drop-down that can sort, filter, group and export the rows of a data source - the Hypernova combo box for picking a record by its name.
delegate AutoCompletingHandlerRepresents the method that handles AutoCompleting.
delegate CustomSortingHandlerRepresents the method that handles CustomSorting.
delegate DropDownProcessHandlerRepresents the method that handles DropDownAboutToBeShown, and can stop the drop-down opening.
class MultiColumnDropDownWindowConfigurationThe appearance of the multi-column drop-down of a BinaryTextComboBox: its header and footer bands, its column headings and the message it shows when there are no rows.
delegate NotInListHandlerRepresents the method that handles NotInList.
class BinaryTreeListViewComboBoxCellThe cell of a BinaryComboBoxColumn: a combo box cell whose editor is a BinaryTextComboBox.
enum BuiltinFilterOnNonStringTypeColumnFilterResultsModeHow the built-in filter of the BinaryTextComboBox multi-column drop-down matches a column that holds numbers, dates or other values that are not text.
enum ColumnDataTypeFormatThe kind of value a column of the BinaryTextComboBox multi-column drop-down holds, which decides how its values are formatted for display.
class ColumnDataTypeFormatInfoContainerHow one column of the BinaryTextComboBox multi-column drop-down formats its values: the kind of value it holds and the format string to apply.
enum DropDownWindowDisplayOrientationWhich way the multi-column drop-down of a BinaryTextComboBox extends from the control.
enum FontNameDisplayStyleHow a BinaryImageComboBox font list draws the font names.
enum HeaderImageStyleWhich picture, if any, the header band of a multi-column drop-down shows.
enum ItemSelectionClickWhether the user picks a row of the BinaryTextComboBox multi-column drop-down with one click or two.
enum ListStyleWhat a BinaryImageComboBox lists: your own images and text, the computer's drives, or the installed fonts.
class MultiColumnDropDownWindowConfigurationThe appearance of the multi-column drop-down opened by the cells of a BinaryComboBoxColumn: its header and footer bands, its column heading font and its no-data message.
class MultiColumnDropDownWindowConfigurationTypeConverterLets the Properties window show a MultiColumnDropDownWindowConfiguration as an expandable set of its own properties, rather than as a single value.
enum MultiColumnDroplistWindowAnimationStyleHow the multi-column drop-down of a BinaryTextComboBox animates as it closes after the user picks a row.
class MultiColumnViewUIElementsTextProviderThe captions, menu commands and messages of the BinaryTextComboBox multi-column drop-down, gathered in one place so they can be translated or reworded.
enum XPThemeThe Windows XP colour schemes a Hypernova combo box can take its colours from.