HBasicControls Unit
ThEdit
A custom edit control that extends standard VCLTEdit
behavior with localization, data typing, and visual customization features.Designed as part of the SYE framework, it supports runtime language switching, visual border cues, and temporary read-only locking for UI protection.
Internally built upon
TSYE_Control
for potential FMX cross-compatibility in the future.Enable_Innr_Editor_Rules
Activates internal rules that modify the edit control's behavior during focus, input, or validation events.Typically used to enable stricter or enhanced editing constraints based on application logic.
Property Enable_Innr_Editor_Rules: Boolean;
Draw_Border_Line_On_Focus
IfTrue
, the control draws a visual border line when it receives focus.Used to provide clear UI feedback indicating the active input field.
Property Draw_Border_Line_On_Focus: Boolean;
Set_Other_Language_Then_Default
Assigns a specific language for the edit control, overriding the application's default language settings.Procedure Set_Other_Language_Then_Default(Language: ThTranslation_Language);
Parameters
- Language: ThTranslation_Language; The language to be used locally for this control.
Language
Retrieves the current language setting of the edit control.Function Language: ThTranslation_Language;
Return Value
Returns the currently assignedThTranslation_Language
for this control.rt_Readonly
Sets the control into a read-only mode without altering its permanent property.Useful when disabling UI editing due to external locking mechanisms.
Procedure rt_Readonly(Prevent_Edit: Boolean);
Parameters
- Prevent_Edit: Boolean; If
True
, disables text editing temporarily.
LocalLang
Indicates whether the control uses a local language.Property LocalLang: Boolean;
Kind
Defines the expected data type of the control's content.This affects visual formatting, validation, and behavior.
Property Kind: ThDataType Read FKind Write SetKind Default he_String;
ThMemo
A custom multiline edit control extending the standard VCLTMemo
component with enhanced behavior and localization support.Part of the SYE framework, this control inherits from
TSYE_Control
and supports dynamic language switching, visual cues on focus, and editor state control.Intended for future VCL-to-FMX compatibility while providing consistent behavior in cross-platform environments.
Enable_Innr_Editor_Rules
Enables internal editing rules that control how the memo behaves during input, focus, and validation phases.Used to apply consistent behavior rules across the application's input controls.
Property Enable_Innr_Editor_Rules: Boolean;
Enable_Focus_Color
IfTrue
, the background or border of the memo is visually modified when the control gains focus.This provides a visual cue to users indicating that the memo is active.
Property Enable_Focus_Color: Boolean;
Set_Other_Language_Then_Default
Assigns a specific language for the memo control, overriding the application's default language settingsProcedure Set_Other_Language_Then_Default(Language: ThTranslation_Language);
Parameters
- Language: ThTranslation_Language; The language to be used locally for this control.
Load_Text_From_Unicode_File
Loads the content of a Unicode text file into the memo control.Supports UTF-based file encodings and replaces the current content.
Procedure Load_Text_From_Unicode_File(FileName: String);
Parameters
- FileName: String; The full path to the Unicode text file to load.
Set_Selected_Text
Replaces the currently selected text with a new value, optionally reselecting the new text range.Procedure Set_Selected_Text(CONST Value: String; ReSelectText: Boolean);
Parameters
- Value: String; The new text to insert in place of the current selection.
- ReSelectText: Boolean; If
True
, the new text will remain selected.
LocalLang
Specifies whether the memo control uses a local language.Property LocalLang: Boolean;
Text_Filtered
Provides access to the content of the memo after cleaning system characters.Property Text_Filtered: String;
ThTitleBar
A custom non-client title bar control (Like TLable in Delphi) used to display a label text within the client area.Designed to visually replace the standard Windows title bar with a modern and theme-aware appearance.
Supports integration with popup menus, text alignment, and manual painting events for full UI flexibility.
Typically placed at the top of a window or panel and styled to reflect application branding.
Based on
TSYE_Control
, allowing future compatibility with FMX and advanced styling features.Here is the full documentation for the listed `ThTitleBar` methods and properties, following your project format:
Recomended_Dimensions
Calculates the recommended dimensions for the title bar based on the current control width and text style.Used to auto-adjust the height or size hints depending on layout context.
Function Recomended_Dimensions(Due_To_Current_Width: Boolean): TSize;
Parameters
- Due_To_Current_Width: Boolean; If
True
, the result will reflect the current width constraint.
Return Value
Returns aTSize
structure with the optimal width and height of the control.Recommended_Height
Returns the preferred height for the title bar, based on the current style and font metrics.Function Recommended_Height: Word; Override;
Return Value
Returns the height in pixels recommended for rendering the title bar.Set_Search_Results_Caption
Updates the caption to reflect the number of search results in the given list component.Typically used to dynamically update UI headers following a filtered search operation.
Procedure Set_Search_Results_Caption(List: TComponent);
Parameters
- List: TComponent; The component holding search results (usually a list view or grid).
Set_Status_Results_Caption
Sets the title bar caption to summarize status based on a specific field from the data component.Procedure Set_Status_Results_Caption(List: TComponent; FieldName: String);
Parameters
- List: TComponent; The component providing status data.
- FieldName: String; The specific field name to extract the status value from.
Set_Caption_Under_Thread
Updates the title bar caption safely from a background thread.Ensures thread-safe UI updates without requiring manual synchronization.
Procedure Set_Caption_Under_Thread(New: String);
Parameters
- New: String; The caption text to set from a non-UI thread.
Auto_Caption_Trans
Enables automatic translation of the title bar caption using the active language settings.Property Auto_Caption_Trans: Boolean Read FAutoCapTrans Write Set_AutoCapTrans Default False;
Caption
Defines the text displayed inside the custom title bar.Property Caption: String Read FCaption Write Set_Caption;
Style
Determines the visual style of the title bar, such as simple or extended layout.Property Style: Thtb_Style;
Thtb_Style
Defines the visual style used by theThTitleBar
control.Each style affects alignment, color, and optional icons or layout behaviors.
Style | Description |
---|---|
he_Simple | Minimalistic flat header with no extra styling. |
he_Title1 | Bold main title format with large text. |
he_Title2 | Smaller title format, often used for sub-sections. |
he_Title3 | Lightweight title appearance for nested elements. |
he_GridHeader | Styled specifically for column headers in grid views. |
he_Help | Title bar with help icon and compact text format. |
he_Help2 | Alternative help style with modified spacing or icon alignment. |
he_Fixed | Static title layout, used when resizing or styling must remain constant. |
Center
IfTrue
, horizontally centers the caption text within the title bar.Property Center: Boolean;
VertCenter
IfTrue
, vertically aligns the caption text to the center of the control height.Property VertCenter: Boolean;
White_Skin
If enabled, renders the title bar using a light/white color scheme instead of the default dark or system theme.Property White_Skin: Boolean;
ThStatusBar
A custom status bar control that visually replaces the standardTStatusBar
component.Designed to provide a clean, theme-aware status area at the bottom of forms or panels.
Supports horizontal alignment, simple multi-part layout, and dynamic caption updates.
Internally built on
TSYE_Control
to ensure consistency across platforms and enable future FMX support.Often used to reflect user actions, messages, or system states within the application UI.
Here is the full documentation for the listed `ThStatusBar` methods in your required format:
Recommended_Height
Returns the preferred height for the status bar based on current styling and font metrics.Used for layout calculations and responsive UI rendering.
Function Recommended_Height: Word; Override;
Return Value
Returns the height in pixels recommended for this status bar.SetText_And_MeasureWidth
Sets the text for a specific item in the status bar and measures its visual width for layout purposes.Procedure SetText_And_MeasureWidth(ItemID: Word; New: String);
Parameters
- ItemID: Word; The index of the item (segment) within the status bar.
- New: String; The new caption to be assigned to the specified item.
Set_Myself_As_Main_Form_Default_For_Dialogs
Declares this status bar as the default container for dialog-related title rendering.Used to establish communication with the
ThDialogFormTitle
component.Procedure Set_Myself_As_Main_Form_Default_For_Dialogs;
Link_Module_Components_To_Myself
Connects this status bar to related components from a specific module.Enables integrated behavior and synchronized appearance within forms or dialogs.
Procedure Link_Module_Components_To_Myself(ScanModule: TComponent);
Parameters
- ScanModule: TComponent; The module or form instance containing relevant linked components.
Statusbar_Message_Handler
Handles and displays a status bar message based on a specific purpose, with optional progress and icon indicators.Used for conveying process states, messages, or step progress in visual form.
Procedure Statusbar_Message_Handler(Purpose: ThTable_Statusbar_Msg_Purpose; Note: String;
CurrPos, TotalScope: Double; Icon: String);
Parameters
- Purpose: ThTable_Statusbar_Msg_Purpose; Specifies the type or context of the status message.
- Note: String; The textual message to be shown on the status bar.
- CurrPos: Double; The current progress position (used for visual percentage or tracking).
- TotalScope: Double; The total value representing 100% progress.
- Icon: String; Optional icon name or identifier to visually accompany the message.
ThTable_Statusbar_Msg_Purpose
Defines the purpose of a message sent to the status bar handler.Each value determines how the message is interpreted and displayed within the UI.
Value | Description |
---|---|
he_Msg | Standard informational message without any visual alert or progress indicator. |
he_ErrorMsg | Error message displayed with visual emphasis, typically colored or marked. |
he_Progress | Visual progress bar shown based on the CurrPos and TotalScope values. |
he_Progress_And_Note | Progress bar displayed along with a note or message, useful for long-running tasks. |
Post
Posts a message to the status bar with optional icon and purpose classification.A simplified version of the handler that doesn't include progress tracking.
Procedure Post(Purpose: ThTable_Statusbar_Msg_Purpose; Note: String; Icon: String = '');
Parameters
- Purpose: ThTable_Statusbar_Msg_Purpose; The message type, such as info, error, or progress.
- Note: String; The textual message to display.
- Icon: String; Optional icon identifier to accompany the message (default is empty).
Reset
Clears all displayed messages and resets the status bar to its default visual state.Procedure Reset;
Panels
Defines the set of logical items (segments) that appear in the status bar.Each item can represent a message area, progress indicator, or status label.
Property Panels: ThsbItems;
ThsbItems
Represents a collection of visual items (panels) used within aThStatusBar
control.Each item can display text, status icons, or dynamic content aligned within specific areas of the status bar.
The class provides indexed access, rendering logic, and layout measurement functions to support flexible UI presentation.
Internally manages painting, content updates, and sizing of each individual panel.
Designed to allow modular composition of messages, hints, and runtime feedback for application status areas.
Items
Provides indexed access to individual status bar items within theThsbItems
collection.Each item represents a segment of the status bar that can display text or status information.
Property Items[Index: Integer]: ThsbItem;
Parameters
- Index: Integer; The zero-based index of the item to access within the collection.
Return Value
Returns theThsbItem
instance at the specified index.ThsbItem
Represents a single visual segment within aThStatusBar
control.Each item can display static text, progress indicators, or dynamic content tied to application state.
Provides properties for caption, width calculation, icon handling, and optional alignment behaviors.
Typically managed by the
ThsbItems
collection and rendered as part of the full status bar layout.Designed for modular status composition, allowing multiple panels to coexist with distinct roles.
SetProgress
Sets the current progress percentage for the item, based on a defined scope.Typically used to render a visual progress bar inside the status bar segment.
Function SetProgress(CurrPos, TotalScope: Double): Boolean;
Parameters
- CurrPos: Double; The current value in the progress cycle.
- TotalScope: Double; The total maximum value representing 100% progress.
Return Value
ReturnsTrue
if the progress value was updated.Returns
False
if the calculated percentage did not change.Progress
Represents the progress value in percentage (0 to 100) for the item.Used to visually fill the status panel with a progress indicator.
Property Progress: Integer;
Width
Specifies the fixed width of the item in pixels when rendered inside the status bar. Default value 50Property Width: Word Read;
Text
Defines the text to be displayed in this status bar segment.This can be updated at runtime to reflect dynamic content.
Property Text: String;
Bmp_Icon
Specifies the name of a bitmap icon to display alongside the text in the item.The icon must be available in the application's icon set (ThBmpIcon container) or theme resource.
Property Bmp_Icon: String;
ThPage
A lightweight container panel designed to function as a visual page within multi-page layouts or tabbed interfaces.Used to host grouped controls that are shown or hidden as a logical unit during navigation or dynamic UI transitions.
Supports basic visibility, layout alignment, and theming through the SYE control system.
Built on
TSYE_Control -> ThPage_Base
for consistent rendering and future FMX compatibility.Typically used in wizards, page flows, or content panels that toggle based on user actions or logic states.
Get_Control_Location
Returns the position of a child control relative to the current page base origin.Useful for alignment, animation, or layout validation within nested page structures.
Function Get_Control_Location(Find_Control: TControl): TPoint;
Parameters
- Find_Control: TControl; The child control whose location should be calculated.
Return Value
Returns aTPoint
indicating the X and Y offset of the control relative to this container.Recommended_Height
Calculates the preferred height for the page layout, based on its content and visual rules.Function Recommended_Height: Word; Override;
Return Value
Returns the height in pixels that best fits the content of the page.Locate_Child_Controls
Performs layout positioning for all direct child controls inside the page.Can optionally reset the internal layout index counter before arranging items.
Procedure Locate_Child_Controls(ResetCounter: Boolean = False);
Parameters
- ResetCounter: Boolean; If
True
, resets the control index before layout begins.
Recurse_Locate_Child_Controls
Recursively applies layout positioning to all child controls and their descendants.Useful for initializing deeply nested control trees inside complex page structures.
Procedure Recurse_Locate_Child_Controls;
Recurse_Set_Background_Color
Recursively applies a new background color to all child controls and their descendants.Used to theme or update visual consistency across an entire page section.
Procedure Recurse_Set_Background_Color(NewColor: TColor);
Parameters
- NewColor: TColor; The new background color to apply recursively to all nested elements.
Bottom_Space
Controls whether extra space is reserved at the bottom of the page for layout padding or visual separation.Useful for maintaining visual gaps between grouped sections or page endings.
Property Bottom_Space: Boolean Read FBottom_Space Write FBottom_Space Default True;
Bands
Defines the collection of layout bands (typically horizontal regions) managed by the page.Used for structured layout where each band represents a logical or visual grouping of child controls.
Property Bands: ThpBands;
White_Skin
IfTrue
, renders the page with a light or white-themed background and visual style.Used for overriding default or dark-themed appearances.
Property White_Skin: Boolean;
OnRelocate
Triggered after the page's child controls have been relocated or restructured.Useful for refreshing linked UI elements or triggering dependent calculations.
Property OnRelocate: TNotifyEvent ;
ThpBands
Represents a collection of layout bands used within aThPage
component.Each band serves as a horizontal visual container for grouping related controls inside the page.
The class provides management for band ordering, layout alignment, background coloring, and spacing behavior.
Used to structure complex page UIs into logical sections that can be measured, painted, or dynamically updated.
Implemented to support consistent cross-page visual rules within the SYE component framework.
Add
Creates and adds a new empty band item to the collection.The returned item can then be configured manually with controls, dimensions, and alignment rules.
Function Add: ThpBandItem;
Return Value
Returns the newly createdThpBandItem
instance added to the collection.Add_By_Code
Adds a new band item with full configuration of its content, dimensions, alignment, and layout behavior.Used when generating layout structure dynamically from code logic.
Function Add_By_Code(Col1_Control, Col2_Control: TControl;
Col1_Width, Col2_Width, FixedHeight: Word;
Align: ThPageAlign; AS_Index: Integer;
Horizontal_Space, Vertical_Space, Shrinkable: Boolean): ThpBandItem;
Parameters
- Col1_Control: TControl; First control to appear in the band (left or top depending on flow).
- Col2_Control: TControl; Second control placed beside the first one.
- Col1_Width: Word; Width assigned to the first column.
- Col2_Width: Word; Width assigned to the second column.
- FixedHeight: Word; The fixed height of the band row.
- Align: ThPageAlign; Alignment mode controlling how the band is placed in its parent.
- AS_Index: Integer; Optional index at which to insert the band.
- Horizontal_Space: Boolean; Enables horizontal spacing between controls.
- Vertical_Space: Boolean; Enables vertical padding around controls.
- Shrinkable: Boolean; Indicates whether the band can shrink if space is limited.
Return Value
Returns theThpBandItem
created and added to the layout structure.Items
Provides indexed access to individual band items within theThpBands
collection.Each item represents a visual band containing one or two controls with layout rules.
Property Items[Index: Integer]: ThpBandItem;
Parameters
- Index: Integer; The zero-based index of the band to retrieve or modify.
Return Value
Returns theThpBandItem
at the specified index.ThpBandItem
Defines a single horizontal layout band used within theThpBands
collection of a page container.Each band typically holds several controls (columns) and defines their size, alignment, and spacing behavior.
Provides configuration for fixed dimensions, spacing margins, shrink rules, and layout alignment (e.g. left, right, center).
Used to create structured form layouts, grouped input sections, or dynamic page regions with consistent positioning.
Implemented to support visual clarity and modular control arrangement across
ThPage_Base
containers.Col1_Control
Specifies the first control placed in the band layout.This control appears in the first column of the band.
Property Col1_Control: TControl;
Col1_Width
Defines the width of the first column in pixels.Property Col1_Width: Word;
Horizontal_Space
IfTrue
, horizontal spacing is applied between controls within the band.Useful for maintaining consistent visual gaps across column elements.
Property Horizontal_Space: Boolean;
Vertical_Space
IfTrue
, vertical padding is added above and below the band’s content.Used to ensure visual breathing room between stacked bands.
Property Vertical_Space: Boolean;
Align
Determines how the band aligns within its parent container.Values are defined by the
ThPageAlign
enumeration (e.g. top, center, bottom).Property Align: ThPageAlign;
ThPageAlign = (HpaTop, HpaMiddleStretch, HpaBottom);
Shrinkable
IfTrue
, allows the band to shrink when layout space is constrained.Commonly used in responsive or dynamic UIs to prevent overflow.
Property Shrinkable: Boolean;
FixedHeight
Specifies a fixed height (in pixels) for the band.Overrides automatic height calculations based on child controls.
Property FixedHeight: Word;
Mouse_HorizDrag
If enabled, allows horizontal dragging behavior from within this band.Intended for advanced layout or user interaction features.
Property Mouse_HorizDrag: Boolean;
Mouse_VertDrag
If enabled, allows vertical dragging behavior from within this band.Useful for dynamic layout adjustments via user input.
Property Mouse_VertDrag: Boolean;
ThPageControl
A custom multi-page container that manages a collection ofThPage
instances.Designed to behave like a simplified and theme-aware tab control.
Provides runtime navigation between logical pages, automatic sizing, and centralized layout management.
Built on
TSYE_Control
and aligned with the SYE framework's styling and layout philosophy.Commonly used in wizards, dialogs, and step-by-step interfaces where visual page transitions are needed without tab UI clutter.
rt_UserInt_Enabled
Indicates whether user interaction with the control is currently enabled.Used to temporarily disable all page switching or input handling during automated operations or transitions.
Property rt_UserInt_Enabled: Boolean;
Refresh
Forces a visual update of the page control and its active child page.Overrides the base method to apply SYE-specific invalidation and repaint logic.
Procedure Refresh; Override;
GlobalInit
Initializes all internal structures and prepares the page control for use.Typically called during form creation or dynamic control setup to finalize layout and state.
Procedure GlobalInit;
Recommended_Height
Calculates the preferred height of the page control based on its active page and layout rules.Function Recommended_Height: Word; Override;
Return Value
Returns the height in pixels that best fits the current content of the control.Here is the HTML documentation for the additional `ThPageControl` functions you listed:
PageItem
Retrieves a specific page item from the control by its internal name.Used for runtime lookup or manipulation of a specific page within the control.
Function PageItem(Name: String): THpcItem;
Parameters
- Name: String; The unique name of the page to retrieve.
Return Value
Returns theTHpcItem
that matches the given name, or nil
if not found.ActivePage
Returns the currently active (visible) page managed by the page control.Function ActivePage: THpcItem;
Return Value
Returns theTHpcItem
that is currently active.ActivePage_Recommended_Height
Returns the preferred height for the currently active page.Allows layout managers to adjust to the specific needs of each page dynamically.
Function ActivePage_Recommended_Height: Word;
Return Value
Returns the recommended height in pixels for the currently active page.Here is the HTML documentation for the next group of `ThPageControl` methods:
Register_TFrame
Associates aTFrame
with a named page, optionally applying seamless parenting for layout embedding.Used to dynamically assign visual content to a logical page during runtime initialization.
Procedure Register_TFrame(ForPageName: String; RegFrame: TFrame; Seamless_Parenting: Boolean = False);
Parameters
- ForPageName: String; The name of the page to associate with the frame.
- RegFrame: TFrame; The frame to be hosted in the specified page.
- Seamless_Parenting: Boolean; If
True
, aligns and anchors the frame to fit the page exactly.
SetFocus
Overrides the default focus behavior to ensure the currently active page receives focus.Ensures proper keyboard handling and control activation within the visible page.
Procedure SetFocus; Override;
Post_Hotkey
Dispatches a key event to the currently active page, simulating a hotkey or shortcut press.Allows page-specific shortcut handling without affecting global application keys.
Procedure Post_Hotkey(VAR Key: Word);
Parameters
- Key: Word; The virtual key code to dispatch to the active page.
Rotate_Next_Page
Switches to the next logical page in the sequence.Wraps around to the first page if the end of the list is reached.
Procedure Rotate_Next_Page;
Here is the HTML documentation for the last two `ThPageControl` functions you listed:
How_Many_Visible_Tabs
Returns the number of currently visible pages managed by the page control.Used to count active (non-hidden) pages for layout or navigation purposes.
Function How_Many_Visible_Tabs: Integer;
Return Value
Returns the total number of pages that are currently visible and accessible.PageItem_Rt_Title_Suffix
Locates a page by name and dynamically sets its title using a runtime data suffix from a query (table) data.Function PageItem_Rt_Title_Suffix(PageName: String; Qry: ThTable; _Empty_Title: String = ''): THpcItem;
Parameters
- PageName: String; The internal name of the page to update.
- Qry: ThTable; A dataset providing runtime information (e.g. record count).
- _Empty_Title: String; Optional fallback title if no data is available (default is empty).
Return Value
Returns theTHpcItem
that was found and updated, or nil
if not found.rt_Create_New_Page
Creates and adds a new page to the control with a specified name, icon, and title.Supports optional auto-translation and explicit insertion index.
Function rt_Create_New_Page(_Name, _Bmp_Icon, _Title: String; Auto_Translate: Boolean; Index: Integer = -1): ThPage;
Parameters
- _Name: String; The internal name of the new page.
- _Bmp_Icon: String; Icon name or resource to display for the page (if applicable).
- _Title: String; The visible title of the new page.
- Auto_Translate: Boolean; If
True
, the title is subject to language translation. - Index: Integer; Optional position at which to insert the new page (default is end of list).
Return Value
Returns the newly createdThPage
instance.rt_Delete_Page
Removes a page by its internal name from the page control.Ensures the layout and internal state are updated accordingly.
Function rt_Delete_Page(_Name: String): Boolean;
Parameters
- _Name: String; The internal name of the page to delete.
Return Value
ReturnsTrue
if the page was found and deleted.Returns
False
if no such page exists.ActivePageName
Gets or sets the internal name of the currently active page.Switching the value will activate the corresponding page if it exists.
Property ActivePageName: String;
TabOrder
Inherited property that determines the control's tab navigation order within its parent container.Specifies the index used when navigating with the keyboard.
Property TabOrder;
Pages
Returns the collection of pages managed by the control.Each item in the collection is a
THpcItem
which represents a logical page.Property Pages: THpc_Collection;
BorderLine
IfTrue
, draws a border line around the control's content area.Useful for visually separating the control from surrounding UI elements.
Property BorderLine: Boolean;
OnPageActive
Event triggered when a page becomes active (shown to the user).Can be used to load data or refresh visual elements for the new page.
Property OnPageActive: Thpc_ShowPageEvent;
Thpc_ShowPageEvent
Event handler type used byThPageControl
to notify when a new page becomes active.Triggered during page transitions, allowing the application to perform updates or data loading.
Thpc_ShowPageEvent = Procedure (PageName: String; Sender: ThPageControl) OF Object;
Parameters
- PageName: String; The internal name of the page that has become active.
- Sender: ThPageControl; The page control that triggered the event.
OnRightClick
Event triggered when the user right-clicks on a page tab area.Can be used to show context menus or trigger contextual logic.
Property OnRightClick: Thpc_StrRightClickEvent;
Thpc_StrRightClickEvent
Event handler type used to respond to right-click actions on page tabs in aThPageControl
.Enables context menu handling or interaction with a specific page item.
Thpc_StrRightClickEvent = Procedure (HPC_Item: THpcItem; HPC_Comp: ThPageControl) OF Object;
Parameters
- HPC_Item: THpcItem; The page item that was right-clicked by the user.
- HPC_Comp: ThPageControl; The page control component that owns the item.
THpc_Collection
Represents the internal collection of pages managed by aThPageControl
component.Each item in the collection is a
THpcItem
that corresponds to a single logical page with metadata and visibility settings.Provides indexed access, lookup by name, and helper methods for dynamic page manipulation.
Implements management logic for tab order, visibility, and page transitions within the SYE framework.
Used internally to coordinate rendering, navigation, and interaction for tabless page interfaces.
Items
Provides indexed access to the individual pages within theTHpc_Collection
.Each item represents a page registered in the
ThPageControl
container.Property Items[Index: Integer]: THpcItem Read GetItem Write SetItem; Default;
Parameters
- Index: Integer; The zero-based index of the page to retrieve or modify.
Return Value
Returns theTHpcItem
instance at the specified index.THpcItem
Represents a single logical page entry managed by aThPageControl
component.Stores metadata such as the page name, title, icon, visibility status, and translation flags.
Provides linkage between the logical page definition and the actual
ThPage
instance it refers to.Used internally for navigation, display, and page state management within the control's layout engine.
Acts as the bridge between page registration and runtime behavior in the SYE component framework.
rt_Title_Suffix
A runtime string that is appended to the page title for dynamic notifications or counts.Typically used to display additional context such as record counts or alert indicators in the tab caption.
This suffix does not affect the base title and is managed separately at runtime.
rt_Title_Suffix: String;
GetDisplayName
Returns the display name of the page item for use within the Delphi IDE or object inspector.Overrides the default behavior to present a meaningful name based on the page's internal properties.
Function GetDisplayName: String; Override;
Return Value
Returns a string used for representing the page in the Delphi IDE.Title_RT
Returns the current runtime title of the page, including any dynamic suffix (e.g. record count or notifications).Function Title_RT: String;
Return Value
Returns the combined title string with the optionalrt_Title_Suffix
appended.Hosted_Frame
Returns theTFrame
instance hosted by this page item, if one was assigned.Used when a frame has been registered to visually represent the page’s content.
Property Hosted_Frame: TFrame Read _Frame;
Name
Defines the internal name of the page, used for identification and programmatic access.Must be unique within the
ThPageControl
collection.Property Name: String Read FName Write Set_Name;
Title
Specifies the base title of the page, which may be displayed in the UI (e.g. tab header).This title can be automatically translated and extended with runtime suffixes.
Property Title: String;
Bmp_Icon
Sets the name of a bitmap icon associated with the page.The icon is used to visually represent the page in the tab header or indicator area.
Property Bmp_Icon: String;
Auto_Translate
IfTrue
, the page title is automatically translated according to the current application language.If
False
, the title is displayed as-is, without translation.Property Auto_Translate: Boolean;
Visible
Controls the visibility of the page within the page control.If
False
, the page is excluded from navigation and rendering.Property Visible: Boolean Read FVisible Write Set_Visible;
Page
References the actualThPage
instance associated with this item.Used to access the visual content container bound to the page entry.
Property Page: ThPage;
ThButtonsArea
A container control used to host a horizontal area of buttons, typically placed at the bottom of a dialog or form.Designed to provide consistent layout, spacing, and alignment for standard actions like OK, Cancel, Next, or custom buttons.
Supports dynamic button arrangement, styling, visibility toggling, and flexible anchoring behaviors.
Built on
TSYE_Control
, allowing theme-aware rendering and FMX compatibility in the future.Commonly used in wizards, confirmation dialogs, and configuration pages within SYE-based applications.
Button
Retrieves a button item by its internal name from the button area.Used to access or modify a specific button's state, caption, or behavior.
Function Button(CONST ButtonName: String): ThButtonItem;
Parameters
- ButtonName: String; The internal name of the button to retrieve.
Return Value
Returns the correspondingThButtonItem
, or nil
if not found.PostClick
Simulates a click on the specified button if the control is not in a busy state.Used to trigger actions programmatically while respecting the user interaction lock.
Procedure PostClick(CONST ButtonName: String);
Parameters
- ButtonName: String; The internal name of the button to click.
PostClick_Timer
Schedules a simulated button click after a specified delay in milliseconds.Useful for auto-confirmations, timed dialogs, or guided UI sequences.
Procedure PostClick_Timer(CONST ButtonName: String; MilliSeconds: Integer);
Parameters
- ButtonName: String; The name of the button to trigger.
- MilliSeconds: Integer; Delay before click in milliseconds (valid range: 30–180000).
Post_Hotkey
Processes a hotkey event and dispatches it to a matching button if applicable.Enables keyboard shortcut integration with the button area for enhanced accessibility.
Procedure Post_Hotkey(VAR Key: Word);
Parameters
- Key: Word; The key code representing the hotkey to evaluate and route.
Set_All_Buttons_Enabled
Enables or disables all buttons within the button area.Used to control user interaction globally based on application state.
Procedure Set_All_Buttons_Enabled(New: Boolean);
Parameters
- New: Boolean; If
True
, enables all buttons. IfFalse
, disables them.
Set_All_Buttons_Visible
Shows or hides all buttons in the button area simultaneously.Useful for toggling UI visibility during multi-step flows or dialog states.
Procedure Set_All_Buttons_Visible(New: Boolean);
Parameters
- New: Boolean; If
True
, makes all buttons visible. IfFalse
, hides them.
Set_All_Buttons_Auto_Translate
Enables or disables auto-translation for all button captions.Useful for applying dynamic localization settings across the interface.
Procedure Set_All_Buttons_Auto_Translate(New: Boolean);
Parameters
- New: Boolean; If
True
, enables translation. IfFalse
, uses static captions.
Set_All_Buttons_Lock_Release_UI
Applies or removes UI locking behavior to all buttons in the area.When enabled, button clicks automatically lock and release the interface during their execution.
Procedure Set_All_Buttons_Lock_Release_UI(New: Boolean);
Parameters
- New: Boolean; If
True
, enables UI lock/release logic. IfFalse
, disables it.
Toggle_Radio_Buttons
Simulates radio button behavior by setting the specified button as "down" and releasing others of the same type.Used to implement mutually exclusive toggle groups within the button area.
Procedure Toggle_Radio_Buttons(DownButtonName: String; ButtonType: ThButtonType = he_RadioBtn);
Parameters
- DownButtonName: String; The internal name of the button to set as active.
- ButtonType: ThButtonType; The type of buttons affected (default is
he_RadioBtn
).
ThButtonType = (he_Button, he_UpDown, he_Checkbox, he_RadioBtn, he_Spacer);
Any_Button_Down
Checks whether any button of a given type is currently pressed (down state).Function Any_Button_Down(ButtonType: ThButtonType): Boolean;
Parameters
- ButtonType: ThButtonType; The type of buttons to check for active (down) state.
Return Value
ReturnsTrue
if any button of the given type is currently down.Returns
False
otherwise.Down
Checks whether a specific button is currently in the down (pressed) state.Does not raise an exception if the button is not found.
Function Down(CONST ButtonName: String): Boolean;
Parameters
- ButtonName: String; The internal name of the button to query.
Return Value
ReturnsTrue
if the specified button is down.Returns
False
if the button is up or does not exist.Button_State
Sets the visibility and enabled state of a specific button by name.Procedure Button_State(CONST ButtonName: String; Visible, Enabled: Boolean);
Parameters
- ButtonName: String; The internal name of the button to modify.
- Visible: Boolean; Controls the button’s visibility.
- Enabled: Boolean; Controls whether the button can be clicked.
GlobalInit
Performs global initialization of the button area and all button items.Typically called during form creation or dynamic layout generation.
Procedure GlobalInit;
Recommended_Height
Returns the preferred height of the button area based on the layout and button sizes.Overrides the base method to ensure proper alignment and spacing.
Function Recommended_Height: Word; Override;
Return Value
Returns the height in pixels that fits the current button layout.Max_Button_Width
Calculates the maximum width of a single button, or the total width of all buttons if specified.Function Max_Button_Width(Sum_Total: Boolean = False): Integer;
Parameters
- Sum_Total: Boolean; If
True
, returns the total width of all buttons. IfFalse
, returns only the widest single button.
Return Value
Returns the width in pixels based on the specified mode.rt_Focus_After_ReleaseUI
Specifies the control that should receive focus after the UI is released from a locked state.Typically set during a button click event to return user interaction to a specific input field or control.
rt_Focus_After_ReleaseUI: TWinControl;
Busy
Indicates whether the button area is currently in a "busy" state (e.g. executing an action or locked).When
True
, new interactions like clicks may be deferred or ignored.Property Busy: Boolean;
Thread
Provides access to the internal thread used to execute background button logic.May be used to monitor or control long-running operations triggered by button actions.
Property Thread: ThThread;
Buttons
Returns the collection of buttons contained in the button area.Each item is a
ThButtonItem
that defines its behavior, style, and state.Property Buttons: ThButtonItems;
Layout
Defines the overall layout strategy for arranging buttons within the area.Values are specified using the
ThButtonsArea_Layout
enumeration.Property Layout: ThButtonsArea_Layout;
ThButtonsArea_Layout = (he_Horizonal, he_Vertical, he_HorizIconsBar, he_VertIconsBar, he_Matrix, he_PopupMenu, he_Tiles);
Fix_Width
Specifies a fixed width (in pixels) for the button area.Use
-1
to allow dynamic width adjustment based on parent layout.Property Fix_Width: Integer Read FFix_Width Write Set_FixWidth Default -1;
Fix_Height
Specifies a fixed height (in pixels) for the button area.Overrides automatic height calculation from content if set.
Property Fix_Height: Integer Read FFix_Height Write Set_FixHeight Default 32;
White_Skin
IfTrue
, applies a white or light color theme to the button area.Used to override default system or dark UI styling.
Property White_Skin: Boolean Read FWhite_Skin Write Set_White_Skin Default False;
Script_Integration
Exposes integration features that allow the button area to connect with an external scripting system.Used to bind scripted actions or automate button behavior dynamically.
Property Script_Integration;
StrClick
Event triggered when a string-identified button is clicked by the user.Enables high-level handling of named button events without requiring control references.
Property StrClick: Thba_StrClickEvent;
Thba_StrClickEvent
Event handler type triggered when a button is clicked, identified by its internal string name.Used to handle user interactions without requiring direct button object references.
Thba_StrClickEvent = Procedure (ButtonName: String; Sender: ThButtonItem) OF Object;
Parameters
- ButtonName: String; The internal name of the button that was clicked.
- Sender: ThButtonItem; The actual button object that triggered the event.
StrRightClick
Event triggered when the user right-clicks on a button, identified by name.Used to show context menus or handle alternate actions for specific buttons.
Property StrRightClick: Thba_StrRightClickEvent;
Thba_StrRightClickEvent
Event handler type triggered when the user right-clicks a button in the button area.Provides access to both the clicked button and its owning button area container.
Thba_StrRightClickEvent = Procedure (Btn_Item: ThButtonItem; BA_Comp: ThBA_Foundation) OF Object;
Parameters
- Btn_Item: ThButtonItem; The button that was right-clicked.
- BA_Comp: ThBA_Foundation; The button area component containing the button.
Before_Thread_Start
Event triggered just before a background thread begins execution for a button action.Allows preparation or validation steps before time-consuming operations begin.
Property Before_Thread_Start: Thba_Before_Thread;
Thba_Before_Thread
Event handler type triggered before a background thread starts in response to a button click.Allows the application to decide whether the thread should proceed or be canceled.
Thba_Before_Thread = Procedure (ButtonName: String; Sender: ThButtonItem; VAR Continue_Execution: Boolean) OF Object;
Parameters
- ButtonName: String; The internal name of the button that initiated the action.
- Sender: ThButtonItem; The button object that was clicked.
- Continue_Execution: Boolean; Set to
False
to cancel the thread execution.
After_Thread_Is_Done
Event triggered after a background thread completes its execution for a button action.Used to update the UI or perform cleanup once processing is finished.
Property After_Thread_Is_Done: Thba_StrClickEvent;
Before_Popup
Standard VCL-style event triggered before a popup is shown by a button action.Allows cancellation, styling, or data binding just prior to display.
Property Before_Popup: TNotifyEvent;
ThButtonItems
Represents the collection of buttons managed by aThButtonsArea
control.Each item in the collection is a
ThButtonItem
that defines a specific button's caption, icon, event handlers, and behavior flags.Provides indexed and name-based access to buttons, along with methods for dynamic layout and state manipulation.
Used internally by the button area to render, interact with, and control its visual button set.
Supports dynamic creation, modification, and serialization of user-defined or scripted button definitions.
Add
Creates and adds a new, empty button item to the collection.The button can be configured manually after creation.
Function Add: ThButtonItem;
Return Value
Returns the newly createdThButtonItem
instance.AddNew
Adds a fully defined button to the collection, using the specified name, icon, caption, and behavior settings.Used when creating button definitions at runtime or through scripting.
Function AddNew(Name, Bmp_Icon, Caption: String; ButtonType: ThButtonType = he_Button; HotTrack: Boolean = False;
Location: ThButtonLocation = he_FromStart; Down: Boolean = False): ThButtonItem;
Parameters
- Name: String; The internal name used to reference the button.
- Bmp_Icon: String; The name of the bitmap icon assigned to the button.
- Caption: String; The text displayed on the button surface.
- ButtonType: ThButtonType; Defines the visual and functional style of the button (default is
he_Button
). - HotTrack: Boolean; If
True
, enables hover highlight effect. - Location: ThButtonLocation; Determines where to place the button relative to others (default is
he_FromStart
). - Down: Boolean; Sets the initial "down" state (pressed) of the button.
Return Value
Returns the newly added and configuredThButtonItem
instance.Items
Provides indexed access to the button items in the collection.Each item can be used to control button behavior, appearance, and events.
Property Items[Index: Integer]: ThButtonItem;
Parameters
- Index: Integer; The zero-based index of the button in the list.
Return Value
Returns theThButtonItem
at the specified index.ThButtonItem
Represents a single button within aThButtonsArea
control.Encapsulates the button’s properties such as name, caption, icon, state, visibility, and behavior type.
Supports optional threading, click events, toggle modes, UI locking, auto-translation, and layout customization.
Designed for high-level integration with wizards, dialogs, and dynamic button panels in SYE-based applications.
Used by
ThButtonItems
to define, control, and render individual interactive buttons.Final_Caption_String
Returns the final caption string that will be displayed on the button, optionally including the hotkey indicator.Applies auto-translation and formatting as needed.
Function Final_Caption_String(Inc_HotKey: Boolean = True): String;
Parameters
- Inc_HotKey: Boolean; If
True
, includes hotkey symbol (e.g., ampersand) in the result.
Return Value
Returns the fully formatted caption string as it will appear on the button.Popup_Screen_Coords
Returns the screen coordinates where a popup related to this button should appear.Used to anchor menus or overlays to the button’s position.
Function Popup_Screen_Coords: TPoint;
Return Value
Returns aTPoint
representing the screen coordinates for popup alignment.Dyn_For_Script
Indicates whether the button was dynamically created through scripting logic.Used to identify buttons that should be managed by external automation or scripting engines.
Function Dyn_For_Script: Boolean;
Return Value
ReturnsTrue
if the button was created by script integration.Returns
False
if the button is static or design-time defined.rt_Skip_Next_ReleaseUI
If set toTrue
, prevents the automatic UI release after the next button click.Used when the button's logic intentionally retains the UI in a locked state (e.g., for nested or chained operations).
This flag is reset automatically after being applied once.
rt_Skip_Next_ReleaseUI: Boolean;
Enabled
Controls whether the button is interactive and can receive user clicks.When
False
, the button is grayed out and cannot be activated.Property Enabled: Boolean;
Visible
Determines whether the button is currently visible in the button area layout.When
False
, the button is hidden but still exists in the collection.Property Visible: Boolean;
Name
Specifies the internal name of the button, used for scripting, event handling, and runtime identification.Must be unique within the parent button area.
Property Name: String;
Caption
Defines the text displayed on the button.Can include hotkey markers (e.g.,
&
) and may be translated if auto-translate is enabled.Property Caption: String;
ButtonType
Defines the visual style and behavior type of the button.Values are defined by the
ThButtonType
enumeration (e.g., standard button, radio button, etc).Property ButtonType: ThButtonType;
Bmp_Icon
Specifies the bitmap icon associated with the button, if any.Used for visual identification or branding within the button area.
Property Bmp_Icon: String;
Location
Determines the layout placement of the button in the button area (e.g., from start or from end).Uses the
ThButtonLocation
enumeration.Property Location: ThButtonLocation;
HotTrack
IfTrue
, the button highlights visually when hovered by the mouse.Used to enhance interactivity and visual feedback.
Property HotTrack: Boolean;
Auto_Translate
IfTrue
, the button’s caption is automatically translated using the application's current language settings.If
False
, the caption is displayed as-is without localization.Property Auto_Translate: Boolean;
HotKey_Desc
Defines a hotkey description string for tooltip or UI hints.Does not affect actual keyboard shortcut behavior, but may appear in UI documentation or popups.
Property HotKey_Desc: String;
Down
Indicates whether the button is currently in the “pressed” state.Primarily used for toggle and radio button types.
Property Down: Boolean;
Lock_Release_UI
IfTrue
, the UI will automatically be locked during button execution and released when done.Used to prevent double-clicks or conflicting input during processing.
Property Lock_Release_UI: Boolean;
Run_Under_Thread
IfTrue
, the button’s action is executed under a background thread.Allows long-running tasks to run without blocking the UI.
Property Run_Under_Thread: Boolean;
ThDialogFormTitle
A specialized title bar control designed for use at the top of modal dialogs or message forms.Displays the dialog caption with optional icon and help behavior, styled according to the application's visual language.
Supports localization, theming (light/dark), alignment, and integration with
ThStatusBar
and ThButtonsArea
components.Intended to provide a consistent header experience across SYE-styled dialogs while remaining highly customizable and embeddable.
Built on
TSYE_Control
for future FMX compatibility and advanced layout management.This class shares the same properties as
ThButtonsArea
, with several additional / different functions.
_Paint_Mouse_Flag
Controls whether mouse-related visual effects are painted on the title bar.Set this to
False
when rendering the title visually for screen captures or printing purposes._Paint_Mouse_Flag: Boolean;
Auto_Caption_Trans
IfTrue
, the caption text is automatically translated using the current application language.If
False
, the caption is used exactly as assigned without translation.Property Auto_Caption_Trans: Boolean;
Allow_To_Move_Form
Determines whether the user can click and drag the title area to move the parent form.Set to
False
to disable window repositioning via the title bar.Property Allow_To_Move_Form: Boolean;
Caption
Defines the text displayed on the dialog title bar.May be static or translated depending on the
Auto_Caption_Trans
setting.Property Caption: String;
ThPopupMenu
A custom popup menu component designed to replace the standard VCLTPopupMenu
with extended features.Supports SYE-style appearance, Unicode text, icons, dynamic item population, and integration with multi-language applications.
Built for use in modern UIs requiring consistent theming, localization, and flexible command handling.
Compatible with both static menu definitions and dynamically generated items at runtime.
Intended for seamless usage alongside other SYE components with a focus on lightweight UI overlays.
Parent_Anchor
Specifies the control to which the popup menu is visually and positionally anchored.Used to calculate the on-screen position for displaying the popup relative to its parent control.
Parent_Anchor: TWinControl;
Add_New_Button
Creates and adds a new button item to the popup menu with the specified name, caption, and icon.Supports optional auto-translation of the caption.
Function Add_New_Button(Name, Caption, Bmp_Icon: String; Auto_Translate: Boolean = False): ThButtonItem;
Parameters
- Name: String; Internal identifier for the button.
- Caption: String; Text displayed on the button.
- Bmp_Icon: String; Bitmap icon name to associate with the button.
- Auto_Translate: Boolean; If
True
, enables automatic translation of the caption.
Return Value
Returns the createdThButtonItem
instance.Button
Retrieves a button item from the popup menu by its internal name.Function Button(ButtonName: String): ThButtonItem;
Parameters
- ButtonName: String; The internal name of the button to retrieve.
Return Value
Returns the correspondingThButtonItem
, or nil
if not found.Set_All_Buttons_Enabled
Enables or disables all buttons in the popup menu.Useful for globally locking or unlocking menu interaction.
Procedure Set_All_Buttons_Enabled(New: Boolean);
Parameters
- New: Boolean; If
True
, enables all buttons. IfFalse
, disables them.
Set_All_Buttons_Visible
Shows or hides all buttons in the popup menu.Procedure Set_All_Buttons_Visible(New: Boolean);
Parameters
- New: Boolean; If
True
, makes all buttons visible. IfFalse
, hides them.
Close
Closes the popup menu and hides it from view.Used to programmatically dismiss the menu after selection or cancellation.
Procedure Close;
Popup
Displays the popup menu near the associatedParent_Anchor
control.Automatically positions the menu based on layout and anchoring rules.
Procedure Popup; Overload;
Popup (PinPosition)
Displays the popup menu at a specific screen position.Used for absolute placement of the popup regardless of its parent control.
Procedure Popup(PinPosition: TPoint); Overload;
Parameters
- PinPosition: TPoint; The screen coordinates at which to display the popup.
Thread
Returns the internal thread instance used for background execution related to popup button actions.Allows monitoring or coordination of asynchronous logic triggered by the popup menu.
Property Thread: ThThread;
Buttons
Returns the collection of buttons displayed within the popup menu.Each item is a
ThButtonItem
defining the behavior and appearance of a menu command.Property Buttons: ThButtonItems;
LocalLang
IfTrue
, uses a locally defined language context for the popup menu.Overrides the global application language if set.
Property LocalLang: Boolean;
Usage_Notes
A custom string field that can be used to store notes, hints, or script binding references related to the popup menu.Has no visual effect but may be referenced programmatically.
Property Usage_Notes: String;
OnClick
Event triggered when a popup menu button is clicked by the user.Provides access to the clicked button's name and reference for contextual handling.
Property OnClick: Thpm_StrClickEvent;
Thpm_StrClickEvent
Event handler type triggered when a popup menu button is clicked or after its background thread completes.Provides the internal name of the button as the identifier for logic execution.
Thpm_StrClickEvent = Procedure (ButtonName: String) OF Object;
Parameters
- ButtonName: String; The internal name of the clicked popup menu button.
After_Thread_Is_Done
Event triggered after the thread assigned to a popup menu button completes execution.Used to update UI or trigger follow-up actions after background logic completes.
Property After_Thread_Is_Done: Thpm_StrClickEvent;
Flat Function:
Find_First_ThPage
Searches recursively through the child controls of the given form or frame to locate the first instance ofThPage
.Used to auto-detect page containers during dynamic UI initialization or scanning routines.
Function Find_First_ThPage(Form_Frame: TWinControl): ThPage;
Parameters
- Form_Frame: TWinControl; The container to scan (usually a form or a frame).
Return Value
Returns the firstThPage
instance found within the control hierarchy.Returns
nil
if no page is found.