From 14636b8c388c395600f3bed6cb33cf90f0e565f9 Mon Sep 17 00:00:00 2001
From: juha
+ LazStartsStr is a Boolean function used to determine if the string in AText starts wih the text specified in ASubText. It is a modified version of StartsStr from the RTL
+ LazStartsStr casts the values in ASubText and AText to PChar types, and calls StrLComp to perform the comparison.
+
+ The returns value is True when AText begins with the specified sub-text. It also returns True when ASubText is an empty string (''), which is Delphi compatible.
+
+ LazEndsStr is a Boolean function used to determine if the string in AText ends wih the text specified in ASubText. It is a modified version of EndsStr from the RTL
+ LazEndsStr casts the values in ASubText and AText to PChar types, and calls StrLComp to perform the comparison.
+
+ The returns value is True when AText ends with the specified sub-text. It also returns True when ASubText is an empty string (''), which is Delphi compatible.
+
+ LazStartsText is a fast implementation of StartsText. The version in the RTL
+ LazStartsText casts the values in ASubText and AText to PChar types, and calls StrLIComp to perform a case-insensitive comparison for the number of characters in ASubText.
+
+ The return value is True when ASubText and AText start with the same values. The return value is also True when ASubText is an empty string (''); this is Delphi compatible. The return value is False when StrLIComp returns a non-zero value.
+
+ LazEndsText is a fast implementation of EndsText. The version in the RTL
+ LazEndsText casts the values in ASubText and AText to PChar types, and calls StrLIComp to perform a case-insensitive comparison for the number of characters in ASubText at the end of the value in AText.
+
+ The return value is True when AText ends with the value in ASubText. The return value is True when ASubText is an empty string (''); this is Delphi compatible. It is False when StrLIComp returns a non-zero value, or when ASubText is longer than AText.
+
- LazStartsText is a fast implementation of StartsText. The version in the RTL
- LazStartsText calls StrLIComp to perform a case-insensitive comparison between ASubText and AText for the number of characters in ASubText.
-
- The return value is True when ASubText and AText start with the same values. It is False when StrLIComp returns a non-zero value, when ASubText is an empty string, or when ASubText is longer than AText.
-
- LazEndsText is a fast implementation of EndsText. The version in the RTL
- LazEndsText calls StrLIComp to perform a case-insensitive comparison between ASubText and AText for the number of characters in ASubText at the end of the value in AText.
-
- The return value is True when AText ends with the value in ASubText. It is False when StrLIComp returns a non-zero value, when ASubText is an empty string, or when ASubText is longer than AText.
-
BeautifyLineXY is a String function used to combine the values in the Filename, Line, X and Y arguments into a formatted message. The message is in the form:
Filename contains a file name used at the start of the formatted message.
+ The return value is the value in s after removing the Byte Order Mark in UTF8BOM from the start of the string. The return value is the same as the value in s when UTF8BOM is not found in the string.
+
+ No actions are performed in the routine when s is an empty string (''). The return value is also an empty string.
+
+ EMaskError is a EConvertError descendant representing the exception raised when an invalid character is found in a value passed to the TMask.Create constructor.
+
+ Mask specifications in TMask are limited to the single-byte code points in the UTF-8 character set. EMaskError is raised when a value with a muti-byte code point is encountered.
+
TMaskChar is a variant record type with members used to represent details for mask character types in the TMaskCharType enumeration. TMaskChar is used to implement the Chars member in the TMaskString record type.
@@ -131,20 +149,21 @@
- A mask is a comparison pattern built using wildcards, sets and/or literal characters.
+ A mask is a comparison pattern built using wildcards, sets and/or literal characters. The mask is limited to the single-byte code points in the UTF-8 encoding. Using multi-byte code points in TMask causes an EMaskError exception to be raised.
Each literal character must match a single character in the string. Case sensitivity requires the value moCaseSensitive in the options passed to the constructor.
- A set starts with "[" and ends with "]". Each element of a set is a literal character and or a range. A range is defined as first-last literal character. One character of a set must match a single character in the string. A set [!...] matches if the character is not in the set. The option value moDisableSets passed to the constructor disables set processing.
+ A set starts with "[" and ends with "]". Each element of a set is a literal character and or a range. A range is defined as a first-to-last literal character string. One character of a set must match a single character in the string. A set [!...] matches if the character is not in the set. The option value moDisableSets passed to the constructor disables set processing.
- Wildcards are the * and ? characters. An asterisk matches any number of characters. A question mark matches a single character.
+ Wildcards are the * and ? characters. An asterisk matches any number of characters. A question mark matches a single character.
For example: 'Hello world' matches to the mask 'H?ll[xoy] w*d'.
@@ -152,8 +171,22 @@
examplefile.pas (123, 1) The error message goes here.
+examplefile.pas (123, 1) The error message goes here.
- AValue contain the mask value compared to a given file name in the method for the class. + AValue contains the pattern compared to a given file name in methods for the class. While defined as a String type, AValue is limited to the single-byte code points in the UTF-8 encoding. Using a multi-byte UTF-8 code point in AValue causes an EMaskError exception to be raised.
Each UTF-8 code point in AValue is examined, and the internal TMaskString is updated to reflect how the mask character is applied. For example: @@ -183,7 +216,7 @@ AOptions contains zero or more TMaskOption values which enable or disable features in the methods for the class instance.
- Create calls the InitMaskString method to initial the internal TMaskString instance used in the class. + Create calls the private InitMaskString method to initialize the internal TMaskString instance used in the class.
- Components on the Common Controls Tab + The following components are added to the Lazarus IDE: +
++ Common Controls Tab
+ The following components are added but not displayed on the component palette: +
++ TStatusPanelBevel is an enumerated type with values which represent bevel styles used on status bar panels. TStatusPanelBevel is the type used to implement the Style property in TStatusPanel. +
+ GetDisplayName is an overridden String function which returns the value displayed as the name of the collection item. The value in the Text property is used as the return value when it is not an empty string (''). Otherwise, the inherited GetDisplayName method is called to get the return value. +
+ Notifies the widgetset class of the value change when a handle has been allocated and SimplePanel is set to True. +
- SimplePanel - boolean. Is there just one continuous panel or several sub-panels? + SimplePanel is a Boolean property which indicates if a single panel is displayed in the status bar with the text in SimpleText
- If true, the value of SimpleText is displayed; if false, the contents of Panels is displayed. + If True, the value of SimpleText is displayed; if False, the contents of the individual Panels is displayed.
Contents can be adjusted with a stringlist editor that pops up when the ellipsis (...) next to Panels is selected and allows insertion of an arbitrary number of sub-panels with their own strings. @@ -983,12 +1000,30 @@
+ SizeGrip is a Boolean property which indicates if a sizing grip (or grabber) is visible for the status bar. The sizing grip is a triangular shape displayed at the bottom-right of the status bar, and provides an alternate way to resize the parent form using the mouse. It presents a larger mouse target than a window border. +
++ The default value for the property is True, and indicates that the sizing grip is visible. +
++ Setting a new value for the property causes the widgetset class to be notified of the change if the handle has been allocated for the control. +
++ Use SizingGripEnabled to determine if the sizing grip is enabled in the control. +
++ Notifies the widgetset class of changes to properties in the custom page. +
+ WMPaint is an overridden method in TCustomPage which handles the LM_PAINT message for the control. It calls the inherited method to render the control. No actions are performed in themethod if the Parent is a TCustomTabControl descendant and the class instance is not the current page in the Parent control. +
++ CMHitTest checks the type for the Parent control to determine whether the Message is ignored or forwarded to the inherited method. When Parent is a TCustomTabControl descendant, the class instance must be the active page in the parent control. When it is not, the Message result is set to 0 and the message is ignored. Otherwise, the inherited method is called to handle the Messsage. +
++ Calls the inherited method to handle a focus change and update the control state. If the control is Visible, the DoShow method is called to signal the OnShow event handler (when assigned). Otherwise, DoHide is called to signal the OnHide event handler (when assigned). +
+
@@ -1230,49 +1289,85 @@
+ DoHide is a method used to perform actions needed when the Visible property is changed to False. DoHide signals the OnHide event handler (when assigned). +
++ DoHide is called from the CMVisibleChanged message handler. +
++ DoShow is a method used to perform actions needed when Visible property is changed to True. DoShow signals the OnShow event handler (when assigned). +
++ DoShow is called from the CMVisibleChanged message handler. +
++ DestroyHandle is an overridden method used to update the control when its Handle is freed in the widgetset class. DestroyHandle calls the inherited method on entry, and updates the Flags property to exclude the value pfAdded. +
++ RealSetText is overridden in TCustomPage to notify the widgetset class of the value change when the Parent control is assigned and has a valid Handle. RealSetText calls the inherited method to apply the new value. AdjustSize is called if the widgetset class was notified. +
+- Create is the overridden constructor for TCustomPage. -
-- Create calls the inherited constructor on entry and sets the default value for the style, visibility, alignment and caption in the class instance. + Create is the overridden constructor for TCustomPage, and calls the inherited constructor on entry. Create sets the default values for the style, visibility, alignment and caption in the class instance.
+ Returns False in TCustomPage. +
++ IsControlVisible is an overridden method in TCustomPage which indicates whether the control is visible. +
++ IsControlVisible calls the inherited method on entry to determine if the Visible property is set to True, and whether the control is visible at design-time. When the Parent control is TCustomTabControl, the value in the PageIndex property must match the value in the parent control. +
++ The return value is True when all of the conditions are satisfied. +
+- Gets the ordinal position in the Parent (tab control) where the current page is displayed. Returns -1 if the page is not present in the notebook or has its TabVisible property set to False. + VisibleIndex is an Integer function used to get the ordinal position for the page instance within the list of visible pages for the Parent control. +
++ When Parent is a TCustomTabControl descendant, its TCustomPage instances are examined to find the current class instance. At run-time, only pages with the TabVisible property set to True are considered in the method. At design-time, all pages are examined. +
++ The return value is the relative position in the list of visible pages where the current class instance was found. The return value is -1 if the current page was not found in the Parent control, or when none of the pages in the Parent control are visible. +
++ When Parent is not derived from TCustomTabControl, the return value is always -1.
+ Raises an EInvalidOperation exception when AParent is not derived from TCustomTabControl. Calls the inherited CheckNewParent method when AParent is unassigned or derived from TCustomTabControl. +
+- PageIndex is an Integer property which contains the ordinal position for the page control in a Parent control. Setting a new value for the property causes the Parent control to call its MoveTab method to reorder the pages on the control. This action is performed when Parent is descended from TCustomTabControl. + PageIndex is an Integer property which contains the ordinal position for the page control in its Parent control. Setting a new value for the property causes the Parent control to call its MoveTab method to reorder the pages. This action is performed when the Parent control is descended from TCustomTabControl.
TabVisible indicates if the Tab in the Parent control is visible.
- Changing the value in the property cause the Parent control to be updated to reflect the new property value. Please note: No actions are performed when the new value for the property is the same as the existing value for the property, or at design-time. + Changing the value in the property cause the Parent control to be updated to reflect the new value. No actions are performed in the method at design-time, or when the property value is not different than the stored value.
- When the Parent control has been assigned and has a handle allocated, the TCustomTabControl in Parent is updated to reflect the new value for the property. When True, the active page in the tab control is changed to the current page instance when one has not already been assigned in the Parent control. The page and its handle are removed from the tab control when the property value is False. + When the Parent control has been assigned and has a handle allocated, the TCustomTabControl in Parent is updated to reflect the new value for the property. When True, the active page in the Parent control is changed to the current page instance if one has not already been assigned in the Parent. The page and its handle are removed from the Tab control when the property value is False.
- Use IsControlVisible to determine if the page is currently the active one displayed in the Parent tab control. + Use IsControlVisible to determine if the page is currently the active page displayed in the Parent tab control.
+ ImageIndex contains the ordinal position in an image list for the image associated with the page instance. The default value for the property is -1 and indicates that an image has not been assigned for the page. The image list is a property available in the Parent control. +
++ Changing the value for the property causes the widgetset class to be notified using its UpdateTabProperties method. +
++ No actions are performed in the method during LCL component streaming, or when the Handle for the control has not been allocated. +
++ The value for the Visible property is not stored in the LCL component streaming mechanism for TCustomPage. +
+ OnHide is a TNotifyEvent property with the event handler signalled when the page is hidden. OnHide is signalled from the DoHide method, and occurs when the value in the Visible property is set to False. +
++ Applications can implement and assign a handler routine to respond to the event notification. The Sender argument contains the TCustomPage instance for the event notification. +
++ OnShow is a TNotifyEvent property with the event handler signalled when the page becomes visible. OnShow is signalled from the DoShow method, and occurs when the value in the Visible property is set to True. +
++ Applications can implement and assign a handler routine to respond to the event notification. The Sender argument contains the TCustomPage instance for the event notification. +
++ TNBPages is a TNBBasePages descendant which implements a list of pages used in TCustomTabControl. +
++ TNBPages extends the ancestor class to include properties for the TCustomTabControl which owns the list of pages (Notebook), and the internal list used to store the TCustomPage instances (PageList). It implements the abstract virtual methods defined in the ancestor, and provides additional methods to maintain the pages in PageList. +
++ Read access is redirected to the PageList property. The return value contains the Caption for the TCustomPage instance stored at the specified position in PageList. +
++ GetCount is an overridden method in TNBPages, and returns the number of items stored in PageList. +
++ GetObject is an overridden method in TNBPages, and redirects indexed object access to the PageList property. The return value is a TObject instance, and must be cast to TCustomPage to access its properties and methods. +
++ Use GetPage to get a page in PageList as a TCustomPage isntance. +
++ GetPage implements the abstract method defined in the ancestor, and is used to get a TCustomPage instance stored at the specified position in PageList. GetPage calls the GetObject method to retrieve the page, and casts it to the TCustomPage type used in the return value. +
++ PageList is a read-only TListWithEvent property which contains the TCustomPage instances for the class instance. +
++ PageList includes an OnChange event handler used to perform notifications when values are added, retrieved, or deleted in the list. The private PageListChange method implements the handler, and ensures that new items in the list are parented to the control in Notebook. +
++ Most methods in TNBPages are redirected to PageList to get or set their values. +
++ Create is the constructor for TNBPages, and calls the inherited Create method. It sets up the list of pages for the notebook (tab control). +
++ Frees and releases resources allocated to PageList. +
++ Calls Delete until all TCustomPage instances in PageList have been removed. +
++ Insert calls the GetPageClass method in NoteBook to get the class reference used to create the new page. The owner of the page instance is the NoteBook control (or its owner when assigned). The value in S is assigned as the Caption in the TCustomPage instance. The InsertPage method in NoteBook is called to store the TCustomPage instance at the position in Index. +
+- FindVisiblePage is used to locate a Page in the tab control with its TabVisible property set to True. Index specifies the ordinal position in Pages property that is the search locus. FindVisiblePage searches the Page collection in ascending order starting at the position in Index. If a visible page is not found, Page is searched in descending order starting at Index -1. + FindVisiblePage is used to locate a Page in the tab control with its TabVisible property set to True.
- The return value contains the ordinal position in Page where the visible tab was located, or -1 when there are no visible tabs in Page. + Index specifies the ordinal position in Pages property that is the search locus. FindVisiblePage searches the Page collection in ascending order starting at the position in Index. If a visible page is not found, Page is searched in descending order starting at Index -1. +
++ The return value contains the ordinal position in the indexed Page property where the visible tab was located, or -1 when there are no visible tabs in Page.
+ Always returns False in TCustomTabControl. +
++ Queued and executed asynchronously by the Application instance. +
+ Handles TCN_SELCHANGE and TCN_SELCHANGING notification codes in Message. +
++ Notifies the widgetset class of the value in PageIndex when the control Handle has been allocated. +
++ Performs actions needed when the active page for the control has been changed. + Signals the OnChange event handler (when assigned). + Called when a new value is assigned to PageIndex. +
++ Change is a method used to performs actions needed to show or hide pages in the tabbed control. +
++ Change calls ShowCurrentPage to display the page in PageIndex, and hide the previously visible page in the tabbed control. Change calls DoChange when the control is not being destroyed, or loaded in the LCL component streaming mechanism. +
++ Change is called from the MoveTab method, and when selection change messages are handled for the control. +
+
@@ -2399,7 +2671,7 @@
@@ -2453,7 +2725,7 @@
@@ -2527,16 +2799,62 @@
+ ActivePageComponent is a TCustomPage property which indicates the active page component for the tabbed control. +
++ PageIndex is used to access the page instance in Page with the property value. The property value is Nil when PageIndex contains a value that is not in the range 0..PageCount-1. +
++ Setting a new value for the property causes the IndexOf method to be called to locate the value in the list of pages. PageIndex is updated to reflect the position for the specified page, and may contain -1 if pages are not used in the tabbed control. +
++ Use ActivePage to get or set the active page in the control using its Caption. +
++ ActivePage is a String property which holds the caption for the active page in the control. +
++ The property value is retrieved using values in the PageIndex and Page properties, and contains the Caption property for the TCustomPage instance. The property value is an empty string ('') if PageIndex is not in the range 0..PageCount-1. +
++ Setting a new value for the property causes the indexed Page property to be searched to locate the TCustomPage instance with a Caption matching Value. If a page is found with the specified caption, the SetPageIndex method is called to validate and store the PageIndex, and signal the OnChange event handler when configured in Options. No actions are performed if the new property Value is not used in Page. +
++ A value assigned to ActivePage at design-time is not stored in the LCL component streaming mechanism. +
++ Use ActivePageComponent to read or write the TCustomPage instance that is the active page in the control. +
++ Use Tabs to access the internal page (or tab) list for the control. +
++ DisplayRect is a read-only TRect property which contains the display rectangle for the tabbed control. The property value contains the TRect instance returned from the TWinControl.GetClientRect method. +
++ Tabs is a TStrings property which contains the list of pages for the tabbed control. It is created using the class reference from GetListClass in the constructor. By default, TNBPages is used as the class type for the page list. It is stored in an internal member, and used when TCustomPage class instances for the control are accessed and maintained. +
++ TabIndex is an Integer property which contains the ordinal position for the active Tab in the tabbed control. It is the same as the PageIndex property; they read and write the same member value. The default value for the property is -1, and indicates that an active tab (page) has not been selected in the control. +
++ Setting a new value for the property causes the OnChange event handler to be signalled when nboDoChangeOnSetIndex has been included in the Options for the control. The event handlre is not signalled at design-time, during LCL component streaming, or when the control is freed. +
++ No actions are performed in the method when the new property value is not in the range -1..PageCount-1, or when the new value is the same as the existing value. +
++ OnChange is a TNotifyEvent property with the event handler signalled when the active page (or tab) for the control is changed. OnChange is enabled when the value nboDoChangeOnSetIndex has been included in the Options for the control. +
++ Setting a new value in either PageIndex or TabIndex signals the assigned and enabled event handler. It is also called from the Change method when selection change messages are handled for the control, and when a tab is re-ordered using the MoveTab method. +
++ GetImageIndex is an Integer function used to get the ordinal position in Images for the image displayed on the specified tab. ThePageIndex contains the Page examined in the method to get its ImageIndex property. If Page does not have a TCustomPage instance at the position in ThePageIndex, -1 is used as the image index. +
++ GetImageIndex signals the OnGetImageIndex event handler (when assigned) to allow a custom image index to be used in the return value. +
++ GetImageIndex is called from methods in the widgetset class when the image displayed on a tab is needed. +
+
The default value for the property is True in TCustomTabControl.
@@ -3028,7 +3403,7 @@
+ TSortType is an enumerated type with values indicating the sort mechanism used for items in tree view or list view controls. TSortType is the type used to implement the SortType property in both TCustomTreeView and TCustomListView. +
++ TListItemState is an enumerated type with values which represent the state for items in a list view control. The values reflect the current settings for properties in TListItem. +
++ Values from TListItemState are stored in the TListItemStates set type. +
++ TListItemStates is a set type used to store zero or more values from the TListItemState enumeration. TListItemStates is the type used to implement the States member in TListItem. Values are included in and excluded from the set when the corresponding properties in TListItem are changed. +
++ TListItemFlags is a set type used to store zero or more values from the TListItemFlag enumeration. It is the type used to implement the internal Flags member in TListItem. +
++ TDisplayCode is an enumerated type with values that denote how the item or subitem is displayed in a list view control. The values are passed as arguments to the DisplayRect and DisplayRectSubItem methods in TListItem, and allows the widgetset to layout and rendering the list items for the platform. +
+TIconOptions is a TPersistent descendant which represents the text wrapping and icon layout settings in the IconOptions property in TCustomListView. @@ -5260,91 +5679,148 @@
+ AssignTo is an overridden method which implements support for the TIconOptions type in the RTL object persistence mechanism. AssignTo allows property values from the current class instance to the stored to the persistent object in Dest. +
++ When Dest is a TIconOptions instance, AssignTo copies the values from the current class instance: +
++ If ADest is not derived from TIconOptions, the inherited method is called. +
++ GetOwner is an overridden method in TIconOptions used to get the owner of the class instance. It returns the TCustomListView instance passed as an argument to the Create constructor. +
++ Create is the overridden constructor for the class instance, and calls the inherited constructor on entry. Create stores the value in AOwner to an internal member used in the class instance, and sets the default value for the Arrangement property to iaTop. +
++ Arrangement is a TIconArrangement property which indicates the layout for the icon or image in a list item relative to its caption text. The default value for the property is iaTop, and causes the icon to be displayed above the caption for the list item. +
++ See TIconArrangement for other values in the enumeration and their usage. +
+ AutoArrange is a Boolean property which indicates if icons in a list view control can be automatically arranged when items are added to the control. The default value for the property is False. +
++ AutoArrange is used when the list view uses the vsIcon or vsSmallIcon view styles. +
+ WrapText is a Boolean property which indicates if the Caption for a list view item can be wrapped into multiple lines. The default value for the property is True. +
++ The Caption for the item is wrapped when its length exceeds the width for the icon in the list item. +
- TListItem is the ancestor class for the Items created in TCustomListView and TListView. Most properties are inherited from ancestors classes, like TPersistent and TObject. + TListItem is the base class for the Items created in TCustomListView and TListView. +
++ TListItem provides properties which identify the content for the list item, like: Caption, SubItems, Data, Index, ImageIndeex, and StateIndex. Other properties indicate the disposition of the item in the control, like: Checked, Cut, DropTarget, Focused, and Selected. +
++ Methods are provided that allow the list item to interact with the control and the widgetset class. +
++ TListItem is the type used in the TListItems container.
+ IsEqual is a Boolean function used to determine if the list item has the same values as the list item specified in AItem. IsEqual compares the values in the Caption, Data, and the internal FStates member in both TListItem instances. The return value is True when the content in the instances is the same. +
++ IsOwnerData is a Boolean function used to determine if the list item has an owner with a valid handle. IsOwnerData always returns False in TListItem. It is overridden in descendent classes like TOwnerDataListItem. +
++ Used in methods in the widgetset class. +
++ Returns the value in the Owner property. +
++ Assign is an overridden method used copy property values from the persistent object in ASource into the current class instance. When ASource is a TListItem descendant, the following property values are copied: +
++ If ASource is not descended from TListItem, the inherited method is called to handle the assignment. +
++ Create is the constructor for the class instance, and calls the inherited constructor on entry. AOwner is the TListItems instance which acts as the container for the list item. +
++ Create sets the default values in member variables used in the class instance. The property interfaces are not used before they are not available until the list item is added to the TListItems container. +
++ Destroy is the overridden destructor for the class instance. +
++ Destroy sets the internal flag that marks the list item for destruction in the Owner. When the Owner is assigned, its ItemDestroying method is called to signal destruction of the list item in the container. +
++ Destroy free and Nils resources allocated for the SubItems property, and calls the inherited destructor prior to exit. +
++ TListColumn is a TCollectionItem descendant which represents an individual column in a multi-column list control. +
++ TListColumn is the type used for items added to the TListColumns collection. +
+- TListViewProperty is an enumerated type with a series of constants denoting the properties of a listview. + TListViewProperty is an enumerated type with values representing Boolean properties used in TCustomListView. +
++ Values from the enumeration are included in or excluded from the TListViewProperties set type. When a value is included in the set, the corresponding Boolean property has been set to True. When a value is excluded from the set, the corresponding Boolean property has been set to False.
+ TListViewProperties is a set type used to store zero or more values from the TListViewProperty enumeration. +
++ The set represents Boolean property values found in TCustomListView / TListView. When a value is included in the set, the correspondng property in TCustomListView has been set to True. The value is excluded from the set when the correspondng property in TCustomListView is set to False. +
++ TListViewProperties is the type used to implement the internal FProperties member in TCustomListView. +
++ TListViewImageList is an enumeration type with values that represent image list sizes used in TCustomListView. +
++ TListHotTrackStyle is an enumerated type with values for cursor shapes displayed for the "hot tracking" state in a TCustomListView control. Hot tracking occurs when the mouse pointer hovers over an item in a control, and it is highlighted (aka hot-lighted). Values from TListHotTrackStyle are stored in the TListHotTrackStyles set type used for the TCustomListView.HotTrackStyles property. +
++ TListHotTrackStyles is a set type used to store zero or more values from the TListHotTrackStyle enumertation. TListHotTrackStyles is the type used to implement the TCustomListView.HotTrackStyles property. +
++
+ TListViewFlags is the type used to implement the internal flags for the TCustomListView control. +
+ ++ Used to provide multi-platform editing capabilities for TCustomListView. Implements the internal editor control in TCustomListView. +
+ Ensures that the VK_ESCAPE and VK_RETURN virtual key codes are handled for the editor. VK_ESCAPE causes the editor to be hidden, and focused in returned to the parent control. VK_RETURN does not hide the editor, but focus is returned to the parent control. In both cases, Key is set to 0 to indicate that the key was handled in the method. +
++ Calls the HideEditor method in the parent control (TCustomListView). + Calls the inherited method prior to exit. +
++ Item is a TListItem property with the list item updated in the editor control. + The value in Item is assigned in the ShowEditor method in the parent control (TCustomListView). Item is set to Nil when the editor control is hidden. +
+- TCustomListView is the base class for TListView. If you want to define your own ListView class, you should derive it from this class. + TCustomListView is the base class for TListView. It provides a multi-platform implementation of the List View control from the Windows API. TCustomListView allows a collection of items to be displayed using different view styles. For instance:
++ GetProperty is a Boolean method used to determine if the specified property value has been set to True in the control. +
++ ALvpOrd contains a value from the TListViewProperty enumeration which identifies the property value accessed in the method. The return value is True when ALvpOrd has been included in the internal TListViewProperties set. +
++ This technique allows multiple Boolean properties to be represented using a single set type member variable. It avoids allocating a Boolean member for each of the property values. +
++ GetProperty is used as the read access specifier for several properties in TCustomListView, including: +
++ See SetProperty for the write access specifier equivalent. +
++ ResizeLastColumn is a method used to make the last visible column fill the remaining unused width for the control. +
++ ResizeLastColumn is relevant when ViewStyle is set to vsList or vsReport, and ColumnCount is not set to 0 (zero). No actions are performed in the method if both conditions are not met. +
++ ResizeLastColumn examines the values in Columns (in reverse order) to find the last TListColumn instance with its Visible property set to True. The accumulated width for the preceeding visible columns (and borders) is calculated. The difference between ClientWidth and the accumulated width is used for the last column when it is a positive non-zero value. +
++ The column affected in the method has its AutoSize, MinWidth, and MaxWidth properties reset before applying the new Width. +
++ ResizeLastColumn is used when AutoWidthLastColumn is set to True. The method is called when the bounds for the control have been changed, or when the vaule in AutoWidthLastColumn has been changed. +
++ SetImageList is the write access specifier for properties including LargeImages, SmallImages, and StateImages. The value in ALvilOrd indicates which image list is updated in the method. +
++ Calls the ItemShow method in the widgetset class. +
++ No actions are performed in the method during LCL component streaming, or when the Handle has not been allocated for the control. +
++ SetProperty is a method used to set the Boolean value for the property represented by the value in ALvpOrd. +
++ ALvpOrd contains a value from the TListViewProperty enumeration which identifies the property updated in the method. AIsSet contains the new Boolean value for the property. +
++ SetProperty is used as the write access specifier for several properties in TCustomListView, including: +
++ This technique allows multiple Boolean properties to be represented using a single set type member variable. It avoids allocating a Boolean member for each of the property values. +
++ See GetProperty for the read access specifier equivalent. +
++ Toggles the Boolean value in the ShowEditorQueued property, and calls the ShowEditor method. +
++ QueuedShowEditor is called when the ShowEditorQueued property is set to True. + Application.QueueAsyncCall is used to asynchronously execute the method. +
++ Not implemented in the current LCL version. +
++ Calls SetImageListWS using the TListViewImageList value passed in the Data argument. +
++ HideEditor is a method used to hide the TCustomListViewEditor instance used as the editor in the list view control. +
++ HideEditor applies the current text in the editor to the selected Item by calling DoEndEdit. The Visible property in the editor is set to False. Values in the editor are reset, including the reference to the list item and the bounds for the editor control. +
++ HideEditor is called when the list view control loses focus. It is also called when horizontal and vertical scroll messages are handled in the control, and when a column has been clicked. +
++ Use ShowEditor to configure and display the editor for the current item in the list view control. +
++ CanEdit is a Boolean function used to determine if the editor can be displayed and activated for the specified Item. The return value defaults to True. +
++ CanEdit signals the OnEditing event handler (when assigned), where the return value can be modified. Use values in Item or the list view control to determine the return value (including their respective ReadOnly properties). +
++ CanEdit is called from the ShowEditor method, and occurs before the Editor in the control is configured and displayed. +
++ Delete is a method used to delete the list item specified in AItem. +
++ In Delphi, Delete is called in reaction to Items.Delete. But if you call it directly, it will also do the actual deletion and then call the OnDeletion handler. We simply call Items.Delete and this will then call Delete again and in the second run we call the OnDeletion handler. Not 100% Delphi compatible, but more compatible then it was before. (BB) +
++ Signals the OnInsert event handler (when assigned) using the value in AItem as an argument. +
++ InsertItem is called from the DoInsert method when an overridden method has been implemented in a descendent class and called from ItemInserted. +
+- No actions are performed in the method if AMode does NOT include one of the following values: lapAutoAdjustWithoutHorizontalScrolling or lapAutoAdjustForDPI. + No actions are performed in the method if AMode does not include one of the following values: lapAutoAdjustWithoutHorizontalScrolling or lapAutoAdjustForDPI.
- Signals the OnInsert event handler (when assigned) using the value in AItem as an argument. -
-- InsertItem is called from the DoInsert method when an overridden method has been implemented in a descendent class and called from ItemInserted. -
-+ Creates columns in the widgetset class when the Handle for the control has been allocated. Calls the inherited method prior to exit. +
++ Ensures that members for the LargeImages, SmallImages, and StateImages are set to Nil when the corresponding image list is removed. +
++ Indicates whether the control, items, or sub-items are custom-drawn using the event handlers available in the control. +
++ Draws the control using the OnCustomDraw or OnAdvancedCustomDraw event handlers (when assigned). +
++ Draws an item in the control using the OnCustomDrawItem or OnAdvancedCustomDrawItem event handlers (when assigned). +
++ Draws a sub-item in the control using the OnCustomDrawSubItem and OnAdvancedCustomDrawSubItem event handlers (when assigned). +
++ Signals the OndrawItem event handler (when assigned) to draw the list item. Calls the FillRect and TextOut methods in the control Canvas when the event handler is not assigned. +
++ Signals the OnData event handler (when assigned) to get the data for the list item. Properties in Item are updated in the event handler with the values needed for the list item. +
+- If the control is marked as ReasdOnly, or Key is not the unshifted F2 function key, the inherited KeyDown method is called to handle the values in Key and Shift. + If the control is marked as ReadOnly, or Key is not the unshifted F2 function key, the inherited KeyDown method is called to handle the values in Key and Shift.
- A typical application might have two ImageLists: one ofLargeImages and one of SmallImages containing two versions of the same collection of images, in large and small format; the index numbers of the first list would correspond with those in the second list. + A typical application might have two ImageLists: one of LargeImages and one of SmallImages containing two versions of the same collection of images, in large and small format; the index numbers of the first list would correspond with those in the second list.
SmallImages could be displayed beside the text strings in the list view and the programmer would supply code to ensure that when an item with its associated SmallImage was selected, the corresponding LargeImage would be displayed in another window.
@@ -8819,7 +9815,7 @@
- A typical application might have two ImageLists: one ofLargeImages and one of SmallImages containing two versions of the same collection of images, in large and small format; the index numbers of the first list would correspond with those in the second list.
+ A typical application might have two ImageLists: one of LargeImages and one of SmallImages containing two versions of the same collection of images, in large and small format; the index numbers of the first list would correspond with those in the second list.
SmallImages could be displayed beside the text strings in the list view and the programmer would supply code to ensure that when an item with its associated SmallImage was selected, the corresponding LargeImage would be displayed in another window.
@@ -8832,7 +9828,7 @@
+ StateImagesWidth is an Integer property the represents width used for state images displayed in the list view. The default value for the property is zero (0) and indicates that a default image width has not been specified. +
- GetNextItem is a TListItem function used to find the next list item after StartItem in the direction given by the Direction parameter. Only items in the state indicated by the States parameter are considered. If no item is found Nil is returned. + GetNextItem is a TListItem function used to find the next list item after StartItem in the direction given by the Direction parameter. Only items in the state indicated by the States parameter are considered. If no item is found, Nil is returned.
- A typical application might have two ImageLists: one ofLargeImages and one of SmallImages, containing two versions of the same collection of images, in large and small format; the index numbers of the first list would correspond with those in the second list. + A typical application might have two ImageLists: one of LargeImages and one of SmallImages, containing two versions of the same collection of images, in large and small format; the index numbers of the first list would correspond with those in the second list.
SmallImages (if assigned to a string-list) can be displayed beside the text strings in the list view and the programmer would supply code to ensure that when an item with its associated Small Image was selected, the corresponding Large Image would be displayed in another window. @@ -9512,25 +10510,25 @@
+ TProgressBarOrientation is an enumerated type with values that represent the orientations used for a progress bar. TProgressBarOrientation is the type used to implement the TCustomProgressBar.Orientation property. +
++ TProgressBarStyle is an enumerated type with values that represent visual display styles for a progress bar. TProgressBarStyle is the type used to implement the TCustomProgressBar.Style property. +
+- TCustomProgressBar is the ancestor for TProgressBar. If you want to define your own ProgressBar class, you should derive it from this class. +
+ TCustomProgressBar is a TWinControl descendant which implements a progress bar control. +
++ A progress bar is used to indicate the progress for a lengthy operation. It contains an indicator bar that is updated with the completion percentage for the task. A progess bar can use either horizontal or vertical orientations. The visual appeance of the control can be configured using drawing styles, themes, and other property settings. +
++ TCustomProgressBar is the ancestor for TProgressBar. +
+ SetParams is a convenience method used to set new values for both the Min and the Max properties. +
++ ApplyChanges is a method used to apply property values from the progress bar to the widgetset class. +
++ Values in the Min, Max, and Position properties are normalized; i. e. Min <= Position <= Max. When the Handle has been allocated for the control, the values are applied to the widgetset class by calling its ApplyChanges method. +
++ No actions are performed in the method when the component is being loaded using the LCL streaming mechanism. +
++ ApplyChanges is called when the Handle is created (or re-created) in InitializeWnd, and from the Loaded method when component streaming has been completed. It is also called when values in properties are changed, including: Min, Max, Position, Step, Orientation, Smooth, and BarShowText. +
++ Create is the overridden constructor for the class instance, and calls the inherited constructor on entry. Create sets component style flags needed for the control, and sets the default values for properties in the class instance. +
++ StepIt is a procedure used to move the progress bar indicator from its current Position using the increment specified in the Step property. The value is Step is added to the value in Position. Position is range limited to the values in Min or Max if needed. +
++ If the Handle for the control has been allocated, the SetPosition method in the widgetset class is called to apply the change in the Position property. +
++ Use StepBy to apply an arbitrary increment value to Position. +
++ Max is an Integer property which specifies the maximum value allowed in the Position property. The default value for the property is 100. +
++ Set values for the Min and Max properties as needed to represent the task or operation. Or, use the SetParams method to set both Min and Max values at the same time. +
++ Changing the value for the property causes the ApplyChanges method to be called. +
++ Min is an Integer property which specifies the minimum value allowed in the Position property. The default value for the property is 0. +
++ Set values for the Min and Max properties as needed to represent the task or operation. Or, use the SetParams method to set both Min and Max values at the same time. +
++ Changing the value for the property causes the ApplyChanges method to be called. +
++ Orientation is a TProgressBarOrientation property whiich indicates the orientation and direction for the progress bar. The default value is pbHorizontal, and orients the progress bar horizontally. As the value in Position is increased, the progress bar is moved from left to right. +
++ See TProgressBarOrientation for the available values and their meanings. +
++ Changing the value for the property causes the ApplyChanges method to be called. +
++ Position is an Integer property which contains the current position for the progress bar. The values in Position, Min, and Max determine the completion percentage and the length for the progress bar indicator when Style is set to pbstNormal. +
++ Position must be in the range specified by the Min and Max properties. Setting a new value for the property causes the ApplyChanges method to be called. It validates and range limits property values before they are applied to the widgetset class. +
++ Use StepIt and Step to increment the value in Position by a fixed value. +
++ Use StepBy to increment the value in Position by an arbitrary value. +
++ The implementation of Smooth drawing is platform-dependent. Some widgetsets do not use the segmented drawing style for their progress bars. For those platforms, the value in the property is not used. +
++ Use Style to control whether a normal progress bar is drawn, or if an animated marquee is used in the progress bar indicator. +
++ The default value for the property is pbstNormal, and causes a solid (or segmented bar) to be displayed. pbstMarquee causes the animated marquee-style progress bar to be displayed. +
+ BarShowText some widgetsets allow text to be displayed on the bar to indicate its position and range of values. The implementation of BarShowText is platform-specific. If the widgetset does not display text on the progress bar, the value in the property is not used. +
++ TUpDownDirection is an enumerated type with values that indicates whether a value is being increased, decreased, or not changed in a TCustomUpDown control. TUpDownDirection is the type passed as an argument to TUDChangingEventEx event handers. +
++ TUDBtnType is an enumerated type with values that represent the buttons used in a TCustomUpDown control. +
+@@ -12336,7 +13519,7 @@
+ TCoolBand is a TCollectionItem descendant which implements a band displayed on the TCoolBar control. +
++ A band contains a single Control that is displayed as a moveable, sizeable area on the TCoolBar control. It has a Grabber (sizing grip) that is used to move and resize the band. It can also have a bitmap image and text displayed at the start of the band prior its Control. The band be configured with a fixed size, and may occupy the entire width for the TCoolBar. +
++ TCoolBand is the type used for the items in the TCoolBands collection. +
+ Reserves space needed for elements in the TCoolBand instance, including: +
++ The return value contains the offset in the band where the Control is displayed. +
++ Uses the value in Text (when assigned). Otherwise, the ClassName is used as the display name. +
++ Create is the overridden constructor for the class instance. Create sets the default values for properties in the collection item, including: +
++ Create calls the inherited method using aCollection as rthe owner of the colleciton item. An exception is raised if ACollection is not a TCoolBands descendant. +
++ The internal TCoolBar reference in the class instance is set to the reference used in aCollection. +
++ Create allocates resource needed for the Bitmap property, and sets its OnChange event handler to the InvalidateCoolBar method. +
++ Frees resources allocated for the Bitmap property, and calls the inherited destructor. +
++ Calls the inherirted Changed method to update the current collection item, and to notify the parent control of a change to the collection. +
++ Height is a read-only Integer property with the height needed for the band and its visual elements including the Control. The value in Height is updated when the TCoolBar instance calls its CalculateAndAlign method, which occurs when the Update method for the collection is called. +
++ Left is a read-only Integer property with the horizontal coordinate for the band. Its value is relative to corresponding coordinate in the TCoolBar control. The value is assigned when the CalculateAndAlign method in the TCoolBar control is called, which occurs when the Update method for the collection is called. +
++ The default value for the property is bsNone, and indicates that borders are not drawn around the band. +
++ The default value for the property is clDefault. Please note that the default value for ParentColor is True, and causes the color defined for the TCoolBar control to be used. +
++ Setting a new value for the property causes the Collection for the class to be updated. The existing control on the band is Nil'd anf the nwe value is assigned. The Parent property in the control is set to the TCoolBar instance. +
++ Contains ordinal position in the TCoolBar.Images property with the image for the band. +
++ TCoolBands is a TCollection descendant used to store TCoolBand instances used the TCoolBar control. TCoolBands is the type used for the TCoolBar.Bands property. +
+ Items is a TCoolBand property which provides indexed access to the class instances in the collection. Values in the collection are accessed by their ordinal position. +
++ Items is the default property for the collection. +
++ Use Add to create a new TCoolBand instance in the collection. +
++ Use Delete and Clear to remove one or all items in the collection. +
++ BandMaximize is not used now but is needed for Delphi compatibility. + It is not used in Delphi's TCoolBar implementation either. +
+ TCustomCoolBar is a TToolWindow descendant which implements a control like the Windows Rebar control. It provides a collection of windowed controls which are displayed in movable, resizable bands. +
++ Each band (or TCoolBand) on the control can have a configurable sizing grip (or grabber), a bitmap, a text label, and a single windowed control. The CoolBar handles the size and position for the control when its band is moved. Each band can have a fixed size, or can automatically re-size to the contained control. Bands can be displayed one band per line, or re-sized and positioned to fill the available width or height for the CoolBar control. +
++ A common use case is hosting multiple toolbars in an application. Separate TTooolbar instance are created and configured with event handlers or actions as needed. Each toolbar is assigned as the control for a band. A perfect example is the Lazarus IDE, which uses TCoolbar to host the file, view and run toolbars in its interface. +
++ Do not create instances of TCustomCoolBar; use the TCoolBar descendant which sets the visibility for the properties in the control. +
+ HorizontalSpacing is an Integer property with the space reserved between visual elements in the control when the horizontal orientation is used. The default value for the property is defined in the cDefHorSpacing constant. +
- Cut, DropHilited, Focused, Selected, MultiSelected, Expanded, HasChildren, Deleting, Bound. + TNodeState is an enumerted type with values representing the state a tree node. The values reflect the settings in property values in a TTreeNode instance, or the use a node in a tree structure. Value(s) from the enumeration are stored in the TNodeStates type.
+ TMultiSelectStyle is a set type used to store zero or more values from the TMultiSelectStyles enumeration. TMultiSelectStyle is the type used to implement the TCustomTreeView.MultiSelectStyle property. +
++ ETreeNodeError is an Exception descendant with the base exception type raised for errors that occur when TTreeNode instances are retrieved. It is the ancestor for the ETreeViewError exception. +
++ ETreeViewError is a ETreeNodeError descendant and the exception raised for errors in a tree structure. +
++ TTreeNodeChangeReason is an enumerated type with values that represent the reason code passed to event handlers when a tree node has been changed. TTreeNodeChangeReason is passed as an argument to the TTVNodeChangedEvent event handler. +
++ TTVChangingEvent is an object procedure type which specifies an event handler signalled when a tree node is about to be changed. TTVChangingEvent is the type used to implement the TCustomTreeView.OnChanging property. +
+Click is an overridden method in TCustomTreeView. It calls the inherited method when a tree node has been selected using a mouse down event. No actions are performed in the method when a tree node has not been selected using the mouse. @@ -19574,7 +20781,7 @@
DblClick is an overridden method in TCustomTreeView. It calls the inherited method when a tree node has been double clicked using the mouse. No actions are performed in the method when a tree node has not been selected and a double click event occurs. @@ -19585,7 +20792,7 @@
Use 0 for auto-sized value.
+Use 0 for the auto-sized value.
+ SelectionCount is a read-only Cardinal property with the number of selected Items in the control. SelectionCount contains the value from the SelectionCount property in Items, and indicates the number of TTreeNode instances available in the Selections property. +
++ The default value for the property is False. Not used in the current LCL implementation. +
+Usage example:
-
- // save old expanded state
- OldExpanded := TTreeNodeExpandedState.Create(ATreeView);
- // ... change a lot of nodes ...
- // restore old expanded state
- OldExpanded.Apply(ATreeView);
- OldExpanded.Free;
-
+
+// save old expanded state
+OldExpanded := TTreeNodeExpandedState.Create(ATreeView);
+// ... change a lot of nodes ...
+// restore old expanded state
+OldExpanded.Apply(ATreeView);
+OldExpanded.Free;
+
+ Destroy calls RaiseGDBException to raise an exception if the current class instance is unassigned (contains Nil). Uses the exception message 'TApplication.Destroy Self=nil'. +
++ Raises an EAssertFalied exception if the CustomApplication and Application variables do not contain the same TCustomApplication instance. +
- TMaskType is an enumerated type which contains values representing mask character types used in TCustomMaskEdit and TMaskEdit. Mask character types control the letters, numbers, literals, space characters, and trimming options allowed for each position in a masked edit control. TMaskType values are stored in the TInternalMask type used in the implementation of TCustomMaskEdit. + TMaskType is an enumerated type which contains values representing mask character types used in TCustomMaskEdit and TMaskEdit. Mask character types control the letters, numbers, literals, space characters, and trimming options allowed for each position in a masked edit control. +
++ TMaskType values are stored in the TInternalMask type, and used in the implementation of TCustomMaskEdit.
+ TIntMaskRec is a record type with members that represent the types and literal used for a character in TCustomMaskEdit. TIntMaskRec instances are stored in the TInternalMask array type, and used in the implementation of the TCustomMaskEdit control. +
+- TInternalMask is an array type which contains up to 255 UTF-8-encoded character values. It is used to implement internal members in TCustomMaskEdit, and exposed as its EditMask property. + TInternalMask is an array type which contains up to 255 TIntMaskRec values representing mask character used in a TCustomMaskEdit control. It is used to implement internal members in TCustomMaskEdit, and realized using its EditMask property.
- AddToMask is a procedure used to append the UTF-8 character in Value to the internal mask for the edit control. AddToMask increments the internal counter which tracks the length of the mask value, and stores Value at the end of the TInternalMask instance. + AddToMask is an overloaded procedure used to append a mask character to the internal mask for the edit control. The overloaded variants allow the mask character to be specified as a TMaskedType enumeration value or a UTF-8-encoded character literal.
- Used in the implementation of the SetMask procedure which sets the value for the EditMask property. + AddToMask increments the length counter for the internal mask, and stores the specified value in the TInternalMask instance. When ALiteral is used for the mask character, the TIntMaskRec.MaskType member is set to Char_IsLiteral. When AMaskType is used, the TIntMaskRec.Literal member is set to an empty string (''). +
++ AddToMask is called from the private SetMask method, and occurs when a new value is assigned to the EditMask property. SetMask clears and reconstructs the internal TInternalMask member with the character classes and literals used in the edit mask.
+ Re-initializes the internal TInternalMask instance with the mask character classes and literals used in the EditMask. +
++ SelectFirstChar is a procedure used to move to and select the first character in the edit control. SelectFirstChar sets the value for the internal member used to track the cursor (or caret) position, and calls SetCursorPos to update the cursor in the control.
- SelectFirstChar is a procedure used to move to and select the first character in the edit control. SelectFirstChar sets the value for the internal member used to track the cursor (or caret) position, and calls SetCursorPos to update the cursor in the control.GotoEnd is a procedure used to set the caret (or cursor) to the last position in the edit control. GotoEnd updates the internal member used to track the cursor position, and calls the SetCursorPos method to apply the cursor position to the control. @@ -623,7 +658,7 @@ Used in the implementation of the KeyDown method.
- CharToMask is a TMaskedType function used to transform the UTF-8-encoded character in UCh to a value from the TMaskedType enumeration. UCh cannot contain a multi-byte UTF-8 value; it must be a single byte value. No actions are performed in the method when UCh contains multiple byte values in the UTF-8 code point. The ordinal value for the character is used to get the corresponding TMaskedType enumeration value used as the return value for the method. -
-- CharToMask is used in the implementation of the following methods: -
-- MaskToChar is a Char function used to transform the specified TMaskType enumeration value into a character for use in the internal TInternalMask instance in the control. The return value from MaskToChar is passed as an argument to the AddToMask method to populate the TInternalMask for the control. -
-- MaskToChar is used (along with AddToMask) in the implementation of the SetMask method (the write access specifier for the EditMask property). -
-- IsMaskChar is a Boolean function used to determine if the UTF-8 character in Ch is a valid mask character. Ch contains one the characters values from the TInternalMask used in the control. IsMaskChar returns True when the value in Ch is any of the TMaskType values other than Char_Start. -
-- IsMaskChar is used in the implementation of methods like IsLiteral and SetSpaceChar. -
-- IsLiteral is a Boolean function which indicates whether the UTF-8 character in Ch represents a mask literal which cannot be edited in the control. The return value is False for any of the following conditions: + IsLiteral is a Boolean function which indicates whether the Integer vaule in Index represents a mask literal which cannot be edited in the control. The return value is False for any of the following conditions:
- CharMatchesMask is a Boolean function used to determine if a character in the value for the control is valid for its EditMask. Ch contains the UTF-8 character examined in the method. Position contains the offset into the EditMask for the mask character compared in the method. + CharMatchesMask is a Boolean function used to determine if a character in the value for the control is valid for its EditMask. Ch contains the UTF-8 character examined in the method.
- Position is in the range 1..MaxLength. When Position is not in this range, no actions are performed in the method and the return value is set to False. + Position contains the offset into the EditMask for the mask character compared in the method. Position is in the range 1..MaxLength. When Position is not in this range, no actions are performed in the method and the return value is set to False.
- CharMatchesMask calls CharToMask to convert the mask character at Position to a TMaskType enumeration value which determines if the value in Ch is valid. The return value is True when Ch contains a valid character value for the mask character type. + CharMatchesMask uses the internal TInternalMask instance to examine the mask definition at the specified position. The value in Ch is compared to the allowed values for the mask character type in the definition. +
++ If an unrecognized mask character type is found in the in the EditMask, an EDBEditError exception is raised. I'm sure there is a reason for raising a database exception, but there is no indication why it was chosen. +
++ The return value is True when Ch contains a valid character value for the mask character type.
CharMatchesMask is used in the implementation of the TextIsValid method.
Fixed literals, like date or time separators, and escaped characters are ignored in the method. For Delphi compatibilty, only literals remain; all other character values are replaced with the character designated in the SpaceChar property.
+- Ch contains the UTF-8 character stored at the cursor (or caret) position. InsertChar calls CanInsertChar to determine if the value in Ch is valid for the mask character at the cursor position. If CanInsertChar returns False, the current selection in the control is deleted (done for Delphi compatibility). + Ch contains the UTF-8 character stored at the cursor (or caret) position. InsertChar calls CanInsertChar to determine if the value is valid for the mask character at the cursor position. If CanInsertChar returns False, the current selection in the control is deleted (done for Delphi compatibility).
If the character is valid for the mask position, any selected characters in the control are replaced with blank values by calling SetCodePoint with the value from ClearChar. SetCodePoint is also called to store Ch at the current position in the text value. RealSetTextWhileMasked is called to notify the control of the change to its Text value. SelectNextChar is called to advance the cursor position to the next available position in the control (when available).
@@ -908,8 +888,8 @@
TextChanged is an overridden procedure used to respond to a change in the value for the Text property. Its purpose is to avoid leaving the control in an invalid state when:
@@ -1413,7 +1393,7 @@
- Calls the inherited KeyDown method. If an edit mask is not assigned in the control, no additional actions are required in the method. If Key and Shift are extended selection navigation keys, no additional actions are required; i. e. Shift+Left, Shift+Right, Shift+Home, Shift+End.
+ Calls the inherited KeyDown method. If an edit mask is not assigned in the control, no additional actions are required in the method.
- KeyDown ensures that the value in the control is reset to its value on entry when Key is the Escape key. KeyDown provides support for clipboard operations, as well as the Delete and Backspace keys.
-
- KeyDown handles Ctrl navigations keys as if they were the unmodified variant of the key; i. e. Ctrl+Left, Ctrl+Right, Ctrl+Home, Ctrl+End. Please note that the Ctrl+Up and Ctrl+Down key and modifier are not valid in TCustomMaskEdit; the keystroke is digested.
+ KeyDown handles the following keys, and performs the following actions:
+ HandleKeyPress is a method used to handle keys forwarded from the KeyPress and UTF8KeyPress methods. No actions are performed in the method if the control is ReadOnly, or IsMasked returns False.
+
+ HandleKeyPress set the cursor position to the start of the current selection in the control. If the cursor is on a mask literal, it is advanced to the next writable position.
+
+ When Key is a Period ('.') or a Comma (',') character, the cursor is advanced to the next Period or Comma character in the mask. For other character values, the InsertChar method is called.
+
+ The value in Key is set to an empty string ('') when it is handled in the method.
+
+ SpaceChar is a Char property with the value used to represent Space (text) characters in the value for the control. It corresponds to the '_' character used the mask fields.
+
+ When a Space character is found in the text for the control, or a value has not been provided for a masked character position, it is replaced with this character.
+
+ The default value for the property is '_'.
+
+ Setting a new value for the property causes the existing text in the control to be updated. All occurrences of the existing SpaceChar are converted to the new value for the property, and stored as the new text for the control. The cursor position and text selection are updated when the text is stored.
+
+ SpaceChar is not used when EditMask is an emtpy string (''), or IsMasked is False.
+
- EditMask is a String property which contains the mask specification for the edit control. EditMask contains the delimited mask fields with the character types, storage specifier, and the character used to represent a space in the edit mask. For example:
+ EditMask is a String property which contains the mask specification for the edit control. EditMask contains the delimited mask fields with the character types, storage specifier, and the character value used to represent a space in the edit mask. For example:
- The EditMask is formed with a pattern of characters with the following meaning:
+ The EditMask is formed using a pattern of characters with the following meaning:
Setting a new value for the property causes the value to be decomposed into the internal TInternalMask representing the individual characters in the edit mask. Individual UTF-8 characters in Value are either added to the mask as literals or character types. Clear is called to remove the displayed value in the control, and the initial Text value is set to the value from RealGetText.
+ SelectAll is an overridden method used to select all of the text in the masked edit control. SelectAll ensures that content formatted using the EditMask is handled in the method.
+
+ When IsMasked is True, the inherited RealGetText method is called to get the text content for the control. SelStart and SelLength are updated to use the values needed for the text content. The inherited method is not called.
+
+ When IsMasked is False, the inherited method is called to handle the text selection.
+
+
AMaskEdit.EditMask := '999.999;1;0';
-
\
+ \
after this you can set an arbitrary char
-
>
- after this the chars is in upper case
+ >
+ after this the characters are in in uppercase
-
<
- after this the chars is in lower case
+ <
+ after this the character are in lowercase
-
l
- only a letter but not necessary
+ l
+ only an optional letter
-
L
+ L
only a letter
-
a
- an alphanumeric char (['A'..'Z','a..'z','0'..'9']) but not necessary
+ a
+ an optional alphanumeric character (['A'..'Z','a..'z','0'..'9'])
-
A
- an alphanumeric char
+ A
+ an alphanumeric character
-
c
- any Utf8 char but not necessary
+ c
+ any optional Utf-8 character
-
C
- any Utf8 char #32 - #255
+ C
+ any Utf-8 character in the range #32-#255
-
9
- only a number but not necessary
+ 9
+ only an optional number
-
0
+ 0
only a number
-
#
- only a number or + or -, but not necessary
+ #
+ only an optional number or + or -
-
:
- automatically put the hour separator char
+ :
+ displays the hour separator character
-
/
- automatically put the date separator char
+ /
+ displays the date separator character
-
h
- a hexadecimal character but not necessary (Lazarus extension, not supported by Delphi)
+ h
+
+ an optional hexadecimal character (Lazarus extension, not supported by Delphi)
+
-
H
+ H
a hexadecimal character (Lazarus extension, not supported by Delphi)
-
b
- a binary character but not necessary (Lazarus extension, not supported by Delphi)
+ b
+ an optional binary character (Lazarus extension, not supported by Delphi)
-
B
+ B
a binary character (Lazarus extension, not supported by Delphi)
-
!
- Trim leading blanks, otherwise trim trailing blanks from the data
+ !
+
+ Trim leading or trailing blanks, depending on position of the mask character
+