diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-06-09 10:01:20 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-06-09 10:01:20 +0000 |
commit | 990f428fb090074f37a5c3a7994f035808044a7d (patch) | |
tree | 2be457e9377d398378ee59f93a1e1d853d0e3510 /extras/tiopf/gui/tiDialogs.pas | |
parent | 6e0e18817931e70f11b318c29008eb483ad3f742 (diff) | |
download | fpGUI-990f428fb090074f37a5c3a7994f035808044a7d.tar.xz |
* Fixed the tiGUIIni read/write formstate information for tiOPF based applications.
* Fixed the updating of rows in the StringGrid composite mediator (tiOPF)
* Minor update to the message dialog include file.
Diffstat (limited to 'extras/tiopf/gui/tiDialogs.pas')
-rw-r--r-- | extras/tiopf/gui/tiDialogs.pas | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/extras/tiopf/gui/tiDialogs.pas b/extras/tiopf/gui/tiDialogs.pas index 430cd194..3743bbb3 100644 --- a/extras/tiopf/gui/tiDialogs.pas +++ b/extras/tiopf/gui/tiDialogs.pas @@ -31,6 +31,13 @@ uses procedure tiShowVariant(AValue: Variant; pHeading: string = 'Show variant'); // Show the contents of a stream procedure tiShowStream(const AValue: TStream; const pHeading: string = 'Show stream'); + // Show a <Yes>, <No> dialog box, and return true if <Yes> was selected + function tiAppConfirmation(const AMessage: string): boolean; overload; + function tiAppConfirmation(const AMessage: string; const AValues: array of const): boolean; overload; + // Show a message + procedure tiAppMessage(const AMessage: string); + // Show a warning + procedure tiAppWarning(const AMessage: string); implementation @@ -142,5 +149,26 @@ begin end; end; +function tiAppConfirmation(const AMessage: string): boolean; +begin + Result := TfpgMessageDialog.Question('', AMessage) = mbYes +end; + +function tiAppConfirmation(const AMessage: string; + const AValues: array of const): boolean; +begin + Result := tiAppConfirmation(Format(AMessage, AValues)); +end; + +procedure tiAppMessage(const AMessage: string); +begin + TfpgMessageDialog.Information('', AMessage); +end; + +procedure tiAppWarning(const AMessage: string); +begin + TfpgMessageDialog.Warning('', AMessage); +end; + end. |