Thread Safe Dialogs

PopupMessage

Displays a simple popup message to the user.
procedure PopupMessage(Text: String; Title: String = ''; English: Boolean = False; Parent: TWinControl = NIL);

Parameters

  • Text: String; Message content.
  • Title: String; Optional dialog title.
  • English: Boolean; Forces English text when True.
  • Parent: TWinControl; Optional owner control.

PopupTable

Displays a table-based message/dialog helper for a component table.
procedure PopupTable(CONST Table: TComponent; Title: String = '');

Parameters

  • Table: TComponent; Source table/component to show.
  • Title: String; Optional dialog title.

YesNoDialog (Text)

Shows a Yes/No confirmation dialog from plain text content.
function YesNoDialog(Content: String; Title: String = ''; English: Boolean = False; HelpURL: String = ''; Parent: TWinControl = NIL): Boolean;

Parameters

  • Content: String; Dialog message.
  • Title: String; Optional dialog title.
  • English: Boolean; Forces English text when True.
  • HelpURL: String; Optional help link.
  • Parent: TWinControl; Optional owner control.

Return Value

Returns True if user confirms.
Returns False otherwise.

YesNoDialog (Table)

Shows a Yes/No confirmation dialog based on a table/component context.
function YesNoDialog(CONST Table: TComponent; Title: String = ''; Parent: TWinControl = NIL): Boolean;

Parameters

  • Table: TComponent; Table/component context.
  • Title: String; Optional dialog title.
  • Parent: TWinControl; Optional owner control.

Return Value

Returns True if user confirms.
Returns False otherwise.

DeleteDialog

Shows a delete confirmation dialog.
function DeleteDialog(Subject: String): Boolean;

Parameters

  • Subject: String; Subject/entity to delete.

Return Value

Returns True when deletion is confirmed.
Returns False otherwise.

ModifiedWarningDialog

Shows warning dialog for unsaved modifications.
function ModifiedWarningDialog: Boolean;

Return Value

Returns True when user confirms continuing.
Returns False otherwise.

ModifiedSaveNowDialog

Shows save-now prompt for modified content.
function ModifiedSaveNowDialog: Boolean;

Return Value

Returns True when user chooses to save now.
Returns False otherwise.

ColorDialog

Shows color picker dialog.
function ColorDialog(VAR Color: TColor; Parent: TWinControl = NIL): Boolean;

Parameters

  • Color: TColor; Initial/output color value.
  • Parent: TWinControl; Optional owner control.

Return Value

Returns True when a color is selected.
Returns False when canceled.

SelectFolder

Shows folder selection dialog.
function SelectFolder(VAR Directory: String; Note: String = ''; Parent: TWinControl = NIL): Boolean;

Parameters

  • Directory: String; Initial/output selected path.
  • Note: String; Optional note/message.
  • Parent: TWinControl; Optional owner control.

Return Value

Returns True when a folder is selected.
Returns False when canceled.

OpenFileDialog

Shows open-file dialog, with optional multi-select.
function OpenFileDialog(Caption, ExtList, Path: String; Include_Hidden: Boolean; VAR FileName: String; Multi_Select: Boolean = False; Parent: TWinControl = NIL): Boolean;

Parameters

  • Caption: String; Dialog title.
  • ExtList: String; Extension filter input.
  • Path: String; Initial path.
  • Include_Hidden: Boolean; Include hidden files.
  • FileName: String; Output selected file(s).
  • Multi_Select: Boolean; Enable selecting multiple files.
  • Parent: TWinControl; Optional owner control.

Return Value

Returns True when selection completed.
Returns False when canceled.

SaveFileDialog

Shows save-file dialog.
function SaveFileDialog(Caption, FileExt, Path: String; Include_Hidden: Boolean; VAR FileName: String; Parent: TWinControl = NIL): Boolean;

Parameters

  • Caption: String; Dialog title.
  • FileExt: String; Target extension.
  • Path: String; Initial path.
  • Include_Hidden: Boolean; Include hidden files.
  • FileName: String; Output selected file name.
  • Parent: TWinControl; Optional owner control.

Return Value

Returns True when save target is selected.
Returns False when canceled.

Prevent_Override_Dialog

Asks for overwrite confirmation on existing target file name.
function Prevent_Override_Dialog(Full_FN: String): String;

Parameters

  • Full_FN: String; Candidate full file name.

Return Value

Returns approved file name.
Returns empty string when canceled.

Debug_Write_Log

Writes debug message for design-time diagnostics.
procedure Debug_Write_Log(Subject: TComponent; _Message: String);

Parameters

  • Subject: TComponent; Related component.
  • _Message: String; Debug message text.

ShInt

Shows integer debug helper dialog/message.
procedure ShInt(N: Double);

Parameters

  • N: Double; Numeric value to show.

ShTime

Shows time debug helper dialog/message.
procedure ShTime(TimeVal: Double);

Parameters

  • TimeVal: Double; Time/date value to show.

ShBool

Shows boolean debug helper dialog/message.
procedure ShBool(Flag: Boolean);

Parameters

  • Flag: Boolean; Boolean value to show.

Dialogs_Manager.pas Public Flat APIs

Fields_Dialog

Runs a field-edit dialog based on a table schema.
function Fields_Dialog(Subject: String; Table: ThTable; English: Boolean = False; HelpURL: String = ''; Parent: TWinControl = NIL; CancelBtn: Boolean = True): Boolean;

Return Value

Returns True when dialog is accepted.
Returns False otherwise.

Fields_Dialog2

Runs field-edit dialog with explicit field list selection.
function Fields_Dialog2(Subject: String; Table: ThTable; Fields: ThFlds_Name_Array; CancelBtn: Boolean = True; English: Boolean = False; HelpURL: String = ''; Parent: TWinControl = NIL): Boolean;

Return Value

Returns True when dialog is accepted.
Returns False otherwise.

DG_Select_Dialog

Runs data-grid selection dialog and writes selected values into table fields.
function DG_Select_Dialog(Table: TComponent; Fields: ThFlds_Name_Array; Title: String; YesNoDialog: Boolean; Parent: TWinControl = NIL): Boolean;

Return Value

Returns True when selection is confirmed.
Returns False otherwise.

DG_Select_Checkboxes

Runs checkbox-based data-grid selection dialog.
function DG_Select_Checkboxes(Table: ThTable; Fields: ThFlds_Name_Array; Title: String; Parent: TWinControl = NIL): Boolean;

Return Value

Returns True when selection is confirmed.
Returns False otherwise.

DG_Select_Clear_Dialog

Runs selection dialog with select/clear/cancel response states.
function DG_Select_Clear_Dialog(Table: ThTable; Fields: ThFlds_Name_Array; Title: String; Parent: TWinControl = NIL): ThDialog_Response;

Return Value

Returns a
ThDialog_Response
value (select/clear/cancel).

DG_Browse_Dialog

Runs read/browse dialog for table grid data.
procedure DG_Browse_Dialog(Table: TComponent; Fields: ThFlds_Name_Array; Title: String; AllowExport: Boolean = False; Parent: TWinControl = NIL);

Parameters

  • AllowExport: Boolean; Enables export actions when True.

DG_Edit_Dialog

Runs editable grid dialog for bulk row/column edits.
function DG_Edit_Dialog(Table: ThTable; Fields: ThFlds_Name_Array; Title: String; FixedCols: Byte = 0; Parent: TWinControl = NIL): Boolean;

Return Value

Returns True when edit operation is accepted.
Returns False otherwise.