ComboBoxExtensions
Wisej.Web.Markup.ComboBoxExtensions
Last updated
Was this helpful?
Wisej.Web.Markup.ComboBoxExtensions
Last updated
Was this helpful?
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the ComboBox class.
public class ComboBoxExtensions
Sets the AutoCompleteMode property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the AutoCompleteMode property.
autoCompleteMode
Returns: TComboBox. The modified combo box with the updated AutoCompleteMode property.
This method allows you to specify the auto-complete mode for the combo box.
myComboBox.AutoCompleteMode(AutoCompleteMode.SuggestAppend);
Sets the CharacterCasing property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the CharacterCasing property.
casing
Returns: TComboBox. The modified combo box with the updated CharacterCasing property.
This method allows you to specify the character casing for the text in the combo box.
myComboBox.CharacterCasing(CharacterCasing.Upper);
Sets the DropDownHeight property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the DropDownHeight property.
height
The height of the drop-down portion of the combo box.
Returns: TComboBox. The modified combo box with the updated DropDownHeight property.
This method allows you to specify the height of the drop-down portion of the combo box.
myComboBox.DropDownHeight(200);
Sets the DropDownStyle property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the DropDownStyle property.
style
Returns: TComboBox. The modified combo box with the updated DropDownStyle property.
This method allows you to specify the drop-down style for the combo box.
myComboBox.DropDownStyle(ComboBoxStyle.DropDownList);
Sets the DropDownWidth property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the DropDownWidth property.
width
The width of the drop-down portion of the combo box.
Returns: TComboBox. The modified combo box with the updated DropDownWidth property.
This method allows you to specify the width of the drop-down portion of the combo box.
myComboBox.DropDownWidth(150);
Sets the DroppedDown property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the DroppedDown property.
value
A boolean indicating whether the combo box is dropped down.
Returns: TComboBox. The modified combo box with the updated DroppedDown property.
This method allows you to programmatically open or close the drop-down portion of the combo box.
myComboBox.DroppedDown(true);
Sets the IncrementalSelection property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the IncrementalSelection property.
value
A boolean indicating whether incremental selection is enabled.
Returns: TComboBox. The modified combo box with the updated IncrementalSelection property.
This method allows you to enable or disable incremental selection for the combo box.
myComboBox.IncrementalSelection(true);
Sets the ItemHeight property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the ItemHeight property.
height
The height of each item in the combo box.
Returns: TComboBox. The modified combo box with the updated ItemHeight property.
This method allows you to specify the height of each item in the combo box.
myComboBox.ItemHeight(20);
Adds the specified items to the Items collection of the specified ComboBox.
TComboBox
comboBox
The combo box to which the items should be added.
items
An array of items to add to the combo box.
Returns: TComboBox. The modified combo box with the added items.
This method allows you to add multiple items to the combo box in one call.
myComboBox.Items("Item1", "Item2", "Item3");
Sets the LazyLoading property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the LazyLoading property.
value
A boolean indicating whether lazy loading is enabled.
Returns: TComboBox. The modified combo box with the updated LazyLoading property.
This method allows you to enable or disable lazy loading for the combo box.
myComboBox.LazyLoading(true);
Sets the MaxLength property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the MaxLength property.
length
The maximum number of characters that can be entered in the combo box.
Returns: TComboBox. The modified combo box with the updated MaxLength property.
This method allows you to specify the maximum number of characters that can be entered in the combo box.
myComboBox.MaxLength(50);
Attaches an event handler for the AutoComplete event of the specified ComboBox.
TComboBox
comboBox
The combo box to attach the event handler to.
action
An action to execute during the AutoComplete event, with the combo box and event arguments as parameters.
Returns: TComboBox. The modified combo box with the attached AutoComplete event handler.
This method allows you to define custom auto-complete behavior by executing a specified action during the AutoComplete event.
myComboBox.OnAutoComplete((cb, args) =>
{
// Custom auto-complete logic
});
Attaches an event handler for the DropDownClosed event of the specified ComboBox.
TComboBox
comboBox
The combo box to attach the event handler to.
action
An action to execute when the drop-down portion of the combo box is closed.
Returns: TComboBox. The modified combo box with the attached DropDownClosed event handler.
This method allows you to execute a custom action whenever the drop-down portion of the combo box is closed.
myComboBox.OnDropDownClosed(cb =>
{
AlertBox.Show("Drop-down closed!");
});
Attaches an event handler for the DropDownStyleChanged event of the specified ComboBox.
TComboBox
comboBox
The combo box to attach the event handler to.
action
An action to execute when the DropDownStyle property changes.
Returns: TComboBox. The modified combo box with the attached DropDownStyleChanged event handler.
This method allows you to execute a custom action whenever the DropDownStyle property of the combo box changes.
myComboBox.OnDropDownStyleChanged(cb =>
{
AlertBox.Show("Drop-down style changed!");
});
Attaches an event handler for the Load event of the specified ComboBox.
TComboBox
comboBox
The combo box to attach the event handler to.
action
An action to execute when the combo box is loaded.
Returns: TComboBox. The modified combo box with the attached Load event handler.
This method allows you to execute a custom action whenever the combo box is loaded.
myComboBox.OnLoad(cb =>
{
AlertBox.Show("Combo box loaded!");
});
Attaches an event handler for the SelectedIndexChanged event of the specified ComboBox.
TComboBox
comboBox
The combo box to attach the event handler to.
action
An action to execute when the SelectedIndex property changes.
Returns: TComboBox. The modified combo box with the attached SelectedIndexChanged event handler.
This method allows you to execute a custom action whenever the SelectedIndex property of the combo box changes.
myComboBox.OnSelectedIndexChanged(cb =>
{
AlertBox.Show("Selected index changed!");
});
Attaches an event handler for the SelectedItemChanged event of the specified ComboBox.
TComboBox
comboBox
The combo box to attach the event handler to.
action
An action to execute when the SelectedItem property changes.
Returns: TComboBox. The modified combo box with the attached SelectedItemChanged event handler.
This method allows you to execute a custom action whenever the SelectedItem property of the combo box changes.
myComboBox.OnSelectedItemChanged(cb =>
{
AlertBox.Show("Selected item changed!");
});
Attaches an event handler for the SelectionChangeCommitted event of the specified ComboBox.
TComboBox
comboBox
The combo box to attach the event handler to.
action
An action to execute when the selection change is committed by the user.
Returns: TComboBox. The modified combo box with the attached SelectionChangeCommitted event handler.
This method allows you to execute a custom action whenever the user commits a selection change in the combo box.
myComboBox.OnSelectionChangeCommitted(cb =>
{
AlertBox.Show("Selection change committed!");
});
Attaches an event handler for the SortedChanged event of the specified ComboBox.
TComboBox
comboBox
The combo box to attach the event handler to.
action
An action to execute when the Sorted property changes.
Returns: TComboBox. The modified combo box with the attached SortedChanged event handler.
This method allows you to execute a custom action whenever the Sorted property of the combo box changes.
myComboBox.OnSortedChanged(cb =>
{
AlertBox.Show("Sorted property changed!");
});
Attaches an event handler for the ToolClick event of the specified ComboBox.
TComboBox
comboBox
The combo box to attach the event handler to.
action
An action to execute when a tool is clicked within the combo box.
Returns: TComboBox. The modified combo box with the attached ToolClick event handler.
This method allows you to execute a custom action whenever a tool within the combo box is clicked.
myComboBox.OnToolClick((cb, e) =>
{
AlertBox.Show("Tool clicked!");
});
Sets the SelectedItem property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the SelectedItem property.
item
The item to select in the combo box.
Returns: TComboBox. The modified combo box with the updated SelectedItem property.
This method allows you to specify the selected item in the combo box.
myComboBox.SelectedItem("Item1");
Sets the SelectedText property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the SelectedText property.
text
The text to select in the combo box.
Returns: TComboBox. The modified combo box with the updated SelectedText property.
This method allows you to specify the selected text in the combo box.
myComboBox.SelectedText("SelectedText");
Sets the SelectionLength property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the SelectionLength property.
length
The number of characters to select in the text of the combo box.
Returns: TComboBox. The modified combo box with the updated SelectionLength property.
This method allows you to specify the number of characters to select in the text of the combo box.
myComboBox.SelectionLength(5);
Sets the SelectionStart property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the SelectionStart property.
index
The starting position of the text selection in the combo box.
Returns: TComboBox. The modified combo box with the updated SelectionStart property.
This method allows you to specify the starting position of the text selection in the combo box.
myComboBox.SelectionStart(2);
Sets the SelectOnEnter property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the SelectOnEnter property.
value
A boolean indicating whether the text should be selected on enter.
Returns: TComboBox. The modified combo box with the updated SelectOnEnter property.
This method allows you to enable or disable selecting the text when the combo box is entered.
myComboBox.SelectOnEnter(true);
Sets the Sorted property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the Sorted property.
value
A boolean indicating whether the combo box is sorted.
Returns: TComboBox. The modified combo box with the updated Sorted property.
This method allows you to specify whether the items in the combo box should be sorted automatically.
myComboBox.Sorted(true);
Sets the SpellCheck property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the SpellCheck property.
value
A boolean indicating whether spell check is enabled.
Returns: TComboBox. The modified combo box with the updated SpellCheck property.
This method allows you to enable or disable spell checking for the combo box.
myComboBox.SpellCheck(true);
Adds the specified tools to the Tools collection of the specified ComboBox.
TComboBox
comboBox
The combo box to which the tools should be added.
tools
An array of tools to add to the combo box.
Returns: TComboBox. The modified combo box with the added tools.
This method allows you to add multiple tools to the combo box in one call.
myComboBox.Tools(tool1, tool2, tool3);
Sets the Watermark property of the specified ComboBox.
TComboBox
comboBox
The combo box for which to set the Watermark property.
text
The watermark text to display in the combo box.
Returns: TComboBox. The modified combo box with the updated Watermark property.
This method allows you to set a watermark text for the combo box.
myComboBox.Watermark("Enter text...");
The type of the combo box, must inherit from .
The to set for the combo box.
The type of the combo box, must inherit from .
The to set for the combo box.
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The to set for the combo box.
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .
The type of the combo box, must inherit from .