fmx DialogService.MessageDialog how to use arguments #507
-
DialogService.ShowMessage('hello') |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
This works: DialogService.MessageDialog('hello2', 'mtInformation', ['mbYes', 'mbNo'], 'mbYes', 0, None) |
Beta Was this translation helpful? Give feedback.
-
yes well
but when click yes or no result always is None
xx=DialogService.MessageDialog('hello2', 'mtInformation', ['mbYes', 'mbNo'], 'mbYes', 0, None )
print(xx)
…________________________________
发件人: pyscripter ***@***.***>
发送时间: 2025年7月13日 3:28
收件人: pyscripter/python4delphi ***@***.***>
抄送: liuzg-rgb ***@***.***>; Author ***@***.***>
主题: Re: [pyscripter/python4delphi] fmx DialogService.MessageDialog how to use arguments (Discussion #507)
This works:
DialogService.MessageDialog('hello2', 'mtInformation', ['mbYes', 'mbNo'], 'mbYes', 0, None)
―
Reply to this email directly, view it on GitHub<#507 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BUSUHDGEPIU5HASXCEHOG6T3IHG4XAVCNFSM6AAAAACBMNLWDSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNZUGE3DKNI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
got it
need Wrap
TPyDelphiDialogServiceSync = class(TPyDelphiObject)
private
function GetDelphiObject: TDialogServiceSync;
procedure SetDelphiObject(const Value: TDialogServiceSync);
public
class function DelphiObjectClass: TClass; override;
public
property DelphiObject: TDialogServiceSync read GetDelphiObject
write SetDelphiObject;
xx=DialogServiceSync.MessageDialog('hello2', 'mtInformation', ['mbYes', 'mbNo'], 'mbYes', 0 )
print(xx)
ruslt a integer
thanks
…________________________________
发件人: pyscripter ***@***.***>
发送时间: 2025年7月13日 6:03
收件人: pyscripter/python4delphi ***@***.***>
抄送: liuzg-rgb ***@***.***>; Author ***@***.***>
主题: Re: [pyscripter/python4delphi] fmx DialogService.MessageDialog how to use arguments (Discussion #507)
Of course since DialogService.MessageDialog is a procedure.
class procedure MessageDialog(const AMessage: string; const ADialogType: TMsgDlgType;
const AButtons: TMsgDlgButtons; const ADefaultButton: TMsgDlgBtn; const AHelpCtx: THelpContext;
const ACloseDialogProc: TInputCloseDialogProc); overload;
I am afraid there is no way to provide a function for ACloseDialogProc. But you can use the procedure to show a simple message, with say an OK button.
―
Reply to this email directly, view it on GitHub<#507 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BUSUHDEVZ45ZY4OWTCUZJST3IHZEPAVCNFSM6AAAAACBMNLWDSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNZUGE4TSNQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
This works:
DialogService.MessageDialog('hello2', 'mtInformation', ['mbYes', 'mbNo'], 'mbYes', 0, None)