Skip to main content

xelement-class

The basic abstract class for elements of a row in Korzh.EasyQuery.WinForms.XPanel.

public abstract class Korzh.EasyQuery.WinForms.XElement
: IDisposable

Assembly: Korzh.EasyQuery.WinForms.dll

Constructors

NameTypeDescription
XElement()voidInitializes a new instance of the Korzh.EasyQuery.WinForms.XElement class.

Properties

NameTypeDescription
AllowListboolGets or sets a value indicating whether this row element allows list values.
CanFocusboolGets a value indicating whether the element can receive focus.
CanSelectboolGets a value indicating whether the element can be selected.
CDataobjectGets or sets the custom data associated with element.
DataobjectGets or sets the object associated with element.
DroppedboolGets a value indicating whether this Korzh.EasyQuery.WinForms.XElement is dropped.
ElementControlControlGets the control that implement element's interaction with end user.
EmptyValueTextstringGets or sets the text should be displayed if Korzh.EasyQuery.WinForms.XElement.Value is empty.
FontFontGets or sets the font.
NeedTextAdjustingOnApplyFormatsboolGets or sets a value indicating whether element needs text adjusting when Korzh.EasyQuery.WinForms.XElement.ApplyFormats method is called Default is true.
NeedValidateboolGets the value of date values.
NumericValueFormatstringGets or sets the format of numeric values.
ParentPanelXPanelGets the parent Korzh.EasyQuery.WinForms.XPanel object.
ParentRowXRowGets the row the element belongs to.
ReadOnlyboolGets or sets a value indicating whether the element is read-only.
ReadOnlyColorColorGets or sets the color of the element in "read only" state.
SubTypestringDefines the subtype for some elements.
TextstringGets or sets the text displayed by element.
TextColorColorGets or sets the color of the element's text
ValuestringGets or sets the value that corresponds to current element state.

Events

NameTypeDescription
AltClickEventHandlerOccurs when Ctrl key is held when Korzh.EasyQuery.WinForms.XElement.ElementControl is clicked
ContentChangedContentChangedEventHandlerOccurs when the content of XElement is changed

Methods

NameTypeDescription
Activate()voidActivates this element.
ApplyFormats()voidApplies the formats. This method is called from Korzh.EasyQuery.WinForms.XPanel object when all element parents are set
Arrange(int bottomLine, int rowHeight)voidArranges the Korzh.EasyQuery.WinForms.XElement.ElementControl on base panel.
CalcNewText(string newValue)stringGets the new text from edit control
CalcNewValue()stringGets the new value from edit control
CloseEdit(bool accept)voidCloses the edit if element is in edit state.
CoreGetTextAdjustedByValue(string newValue)stringGets the element's text according to its value. This method can be overridden in inherited classes.
CoreLaunch()voidIs called when both Korzh.EasyQuery.WinForms.XElement.ParentRow and Korzh.EasyQuery.WinForms.XElement.ParentPanel for this element are established.
CoreSetContent(string value, string text)voidSets the content of element (both its value and text). Can be overridden in inherited classes.
CreateElementControl()ControlCreates the Korzh.EasyQuery.WinForms.XElement.ElementControl.
Detach()voidZeros some references to let element be destroyed.
Dispose()voidPerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Dispose(bool disposing)voidPerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
DropDown()voidShows an additional control (Edit, Menu, etc) to change element's value
ElementControlClickHandler(object sender, EventArgs e)voidCalled when user clicks on element control.
ElementControlFontChangedHandler(object sender, EventArgs e)voidCalled when element control font is changed.
ElementControlGotFocusHandler(object sender, EventArgs e)voidCalled when element control got focus.
ElementControlLostFocusHandler(object sender, EventArgs e)voidCalled when element control lost focus.
ElementControlSizeChangedHandler(object sender, EventArgs e)voidCalled when element control size is changed.
Focus()boolSets input focus to the element.
GetTextAdjustedByValue(string newValue)stringGets the element's text according to its value. This method calls Korzh.EasyQuery.WinForms.XElement.CoreGetTextAdjustedByValue(System.String) method of the current object and then pass processing to the parent row.
HideControl()voidHides the control that allows to edit the value.
Invalidate()voidInvalidates the element.
OnAltClick(EventArgs e)voidRaises the Korzh.EasyQuery.WinForms.XElement.AltClick event.
OnBeforeDropDown()voidCalls ElementBeforeDropDown method of the parent row.
OnContentChanged(bool valueChanged, bool textChanged)voidCalled when element's content (text, value or both) is changed.
OnValidate(ValidateValueEventArgs e)voidIs called before element is rolled up.
ParseXmlNode(XmlNode node)voidAbstract method to be overridden by descendants. Parses the XML-description of element.
ReAdjustTextByValue()voidMake Korzh.EasyQuery.WinForms.XElement.Text property empty and call Korzh.EasyQuery.WinForms.XElement.AdjustTextByValue method
RollUp(bool accept)voidBrings element to initial state - hides any specific controls (Edit, Menu etc.) activated by user.
Select()voidActivates the element.
SetContent(string value, string text)voidSets the content of element (both its value and text).
SetContentSilent(string value, string text)voidSets the content of element silently (without nofifying parent row).
SetText(string newText)voidSets the text of element.
SetValue(string newValue)boolFunction to set the value. Can be overridden if needed. Is called from Value property "set" part.
ShowControl()voidShows the control that allows to edit the value.

Static Properties

NameTypeDescription
TagNamestringGets the name of the XML tag concerned with element.

Static Methods

NameTypeDescription
ChangeFontSize(Font font, Single fontSize)FontChanges the size of the font.
Create(string tagName)XElementCreates the row element instance of specified type.
MeasureDisplayStringWidth(Graphics graphics, string text, Font font)intMeasures the width of the display string.
Register(ICreator creator)boolRegisters new type of row element.