HBasicControls: Editing, Titles and Status

HBasicControls overview
Input controls, title bars, and status messages for forms and dialogs.

ThEdit

A custom edit control that extends standard VCL TEdit 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.
It descends from VCL TCustomEdit and adds framework-specific behavior.

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.
ThEdit.Enable_Innr_Editor_Rules: Boolean;

Draw_Border_Line_On_Focus

If True, the control draws a visual border line when it receives focus.
Used to provide clear UI feedback indicating the active input field.
ThEdit.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 ThEdit.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 ThEdit.Language: ThTranslation_Language;

Return Value

Returns he_English when LocalLang is False. Otherwise returns the explicit language override, or he_Local_Translation when no override is set.

rt_Readonly

Temporarily disables the underlying Windows edit control without changing its Enabled property.
The control loses focus when it is disabled; call again with False to restore editing.
Procedure ThEdit.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 ThEdit.LocalLang: Boolean;

Kind

Defines the expected data type of the control's content.
Numeric, date, time, and phone kinds filter typed characters. Several kinds also enable AutoSelect and force left-to-right input.
Property ThEdit.Kind: ThDataType Read FKind Write SetKind Default he_String;

PropGrid_ExtChars

When True, lets the edit accept ! and * while its Kind filters other typed characters. This is a public runtime field.
ThEdit.PropGrid_ExtChars: Boolean;

ScaleForPPI

Scales the edit control for the specified screen PPI. Delphi calls this override during DPI changes.
Procedure ThEdit.ScaleForPPI(NewPPI: Integer); Override;

ThMemo

A custom multiline edit control extending the standard VCL TMemo component with enhanced behavior and localization support.
Part of the SYE framework, this control descends from VCL TCustomMemo and supports dynamic language switching, focus cues, and text search.

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.
ThMemo.Enable_Innr_Editor_Rules: Boolean;

Enable_Focus_Color

If True, 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.
ThMemo.Enable_Focus_Color: Boolean;

Set_Other_Language_Then_Default

Assigns a specific language for the memo control, overriding the application's default language settings
Procedure ThMemo.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

Clears the memo, then loads FileName. It detects UTF-8 and UCS-2; other files are read as ANSI text.
If loading fails, the memo remains empty.
Procedure ThMemo.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 ThMemo.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 ThMemo.LocalLang: Boolean;

Text_Filtered

Gets or sets memo text after removing system characters with Clean_System_Chars_From_Text.
Property ThMemo.Text_Filtered: String;

Search_Dialog

Opens the search dialog. A selection of 3 to 50 characters is searched immediately. The dialog requires Compile_Dialogs.
Procedure ThMemo.Search_Dialog;

Search_Again

Searches from the current selection, wraps to the start, and selects the next occurrence of _Search.
Procedure ThMemo.Search_Again;
Assume Memo is a ThMemo instance:
Memo._Search := 'invoice';
Memo.Search_Again;
Public search text used by Search_Again; Search_Dialog also updates it.
ThMemo._Search: String;
Search and replace dialogs share two history lists across all ThMemo instances: index 0 stores search text and index 1 stores replacement text.
Global_Search_And_Replace_Dialog_Lists: Array[0..1] OF ThStringList;

Search_And_Replace_Dialog

Opens a search and replace dialog when the memo is editable. The dialog requires Compile_Dialogs.
Procedure ThMemo.Search_And_Replace_Dialog;

ScaleForPPI

Scales the memo for the specified screen PPI.
Procedure ThMemo.ScaleForPPI(NewPPI: Integer); Override;

ThTitleBar

A custom label-style control for titles and section headings 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 ThTitleBar.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 a TSize structure with the optimal width and height of the control.
Returns the preferred height for the title bar, based on the current style and font metrics.
Function ThTitleBar.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 ThTitleBar.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 ThTitleBar.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.

Auto_Caption_Trans

Enables automatic translation of the title bar caption using the active language settings.
Property ThTitleBar.Auto_Caption_Trans: Boolean Read FAutoCapTrans Write Set_AutoCapTrans Default False;

Caption

Defines the text displayed inside the custom title bar.
Property ThTitleBar.Caption: String Read FCaption Write Set_Caption;

Style

Determines the visual style of the title bar, such as simple or extended layout.
Property ThTitleBar.Style: Thtb_Style;

    Thtb_Style

    Defines the visual style used by the ThTitleBar 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

If True, horizontally centers the caption text within the title bar.
Property ThTitleBar.Center: Boolean;

VertCenter

If True, vertically aligns the caption text to the center of the control height.
Property ThTitleBar.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 ThTitleBar.White_Skin: Boolean;

Script_Integration

Enables script integration for this title bar.
Property ThTitleBar.Script_Integration: Boolean;

ThStatusBar

A custom status bar control that visually replaces the standard TStatusBar 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: Returns the preferred height for the status bar based on current styling and font metrics.
Used for layout calculations and responsive UI rendering.
Function ThStatusBar.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 ThStatusBar.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 ThStatusBar.Set_Myself_As_Main_Form_Default_For_Dialogs;
Connects this status bar to related components from a specific module.
Enables integrated behavior and synchronized appearance within forms or dialogs.
Procedure ThStatusBar.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 ThStatusBar.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.

Reset

Clears all displayed messages and resets the status bar to its default visual state.
Procedure ThStatusBar.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 ThStatusBar.Panels: ThsbItems;

Note

Sets the note and optional icon. Error greater than zero selects error display; progress is cleared.
Procedure ThStatusBar.Note(Error: Byte; Note: String; Icon: String = '');

ThsbItems

Represents a collection of visual items (panels) used within a ThStatusBar 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 the ThsbItems collection.
Each item represents a segment of the status bar that can display text or status information.
Property ThsbItems.Items[Index: Integer]: ThsbItem;

Parameters

  • Index: Integer; The zero-based index of the item to access within the collection.

Return Value

Returns the ThsbItem instance at the specified index.

ThsbItem

Represents a single visual segment within a ThStatusBar 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 ThsbItem.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

Returns True 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 ThsbItem.Progress: Integer;

Width

Specifies the fixed width of the item in pixels when rendered inside the status bar. Default value 50
Property ThsbItem.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 ThsbItem.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 ThsbItem.Bmp_Icon: String;