ListXElement class

The row element that lets select value from [multilevel] list.

public class Korzh.EasyQuery.WinForms.ListXElement
    : LabelXElement

Package: Korzh.EasyQuery.WinForms (targets: net461, net5.0-windows7.0, netcoreapp3.1)

Assembly: Korzh.EasyQuery.WinForms.dll

Constructors

Name Type Description
ListXElement(string type) void Initializes a new instance of the Korzh.EasyQuery.WinForms.ListXElement class.
ListXElement() void Initializes a new instance of the Korzh.EasyQuery.WinForms.ListXElement class.

Properties

Name Type Description
AllowList bool Gets or sets a value indicating whether this row element allows list values.
AutoSelectFirstItem bool Gets or sets a value indicating whether the element should automatically select first item on Korzh.EasyQuery.WinForms.XElement.CoreLaunch .
ControlType string Gets or sets the type of the control (MENU or LISTBOX).
Items ValueItemList Gets the list of items.
ListName string Gets or sets the name of the list.
Sorting XSortOrder Gets or sets the sort order for the list

Methods

Name Type Description
AddListItem(ValueItem parentItem, ValueItem newItem) void Adds a new item to the list (menu).
AddListItem(ValueItem parentItem, string text, string value, string action, string hint) ValueItem Adds a new item to the list (menu).
AddListItem(ValueItem parentItem, string text, string value) ValueItem Adds a new item to the list (menu).
CalcNewValue() string Gets the new value from edit control
CheckListControl(bool refill) void Checks if the list control is created correctly and re-creates it if necessary.
CoreGetTextAdjustedByValue(string newValue) string Gets the element's text according to its value. This method can be overridden in inherited classes.
CoreLaunch() void Is called when both Korzh.EasyQuery.WinForms.XElement.ParentRow and Korzh.EasyQuery.WinForms.XElement.ParentPanel for this element are established.
CoreRefreshList() void Internal implementation of Korzh.EasyQuery.WinForms.ListXElement.RefreshList method. It makes parent panel to raise RequestList event to fill the custom lists.
CreateListControl() ListControl Creates the list control.
CreateRootItem() void Creates the root ValueItem object.
DoItemsChanged(object sender, EventArgs e) void Called when Changed event occurs in root item
GetItemByValue(string val, ValueItem& resItem) bool Gets the item by value.
GetValueByItems() string Calculates element value by currently selected items.
HideControl() void Hides the control that allows to edit the value.
LinkClickedHandler(object sender, LinkLabelLinkClickedEventArgs e) void Handler of element control System.Windows.Forms.Control.Click event.
OnItemsReassigned() void Called when Items property have been assigned to new value.
ParseXmlNode(XmlNode node) void Parses the XML-description of element.
RecreateListControl() void Recreates the list control according on control type (LISTBOX or MENU)
RefreshList() void Refreshes the list.
RequestList(string listName) void Generates internal signal to request the list.
SelectFirstItem() void Selects the first item.
SelectItemsByValue() void Selects the items by value.
ShowControl() void Shows the control that allows to edit the value.
ShowListControl() void Shows the list control.

Static Fields

Name Type Description
DefaultListControlType string Represents default control type for list elements Will be applied to all new Korzh.EasyQuery.WinForms.ListXElement objects

Static Properties

Name Type Description
TagName string Gets the name of the XML tag concerned with element.