delphilearner Posted May 12, 2022 Share Posted May 12, 2022 Hi guys, my UniGuiDialog.MessageDlg always return 0 before any dialog button is clicked, and the number will not change after clicking yes/no button in the dialog. Not sure if it is a bug.. here is my code: procedure TMainForm.UniButton3Click(Sender: TObject); var int: integer; begin int := MessageDlg('ha', mtConfirmation, mbYesNo); UniEdit1.Text:= inttostr(int); end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 12, 2022 Share Posted May 12, 2022 Hello, Excuse me, did you start programming with UniGUI today? Quote Link to comment Share on other sites More sharing options...
delphilearner Posted May 12, 2022 Author Share Posted May 12, 2022 Hello, I just started delphi and unigui recently. What I am trying to do is very similar to this: procedure TMainForm.UniButton6Click(Sender: TObject); begin if MessageDlg('Dialog3', mtConfirmation, mbYesNo) = mrno then begin Abort; end; end; But since it will always turn a 0, it won't abort even the No button is clicked. That makes me confused. Thank you! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 12, 2022 Share Posted May 12, 2022 http://www.unigui.com/doc/online_help/synch-and-asynch-operations.htm Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 12, 2022 Share Posted May 12, 2022 And please see related demos. Quote Link to comment Share on other sites More sharing options...
delphilearner Posted May 12, 2022 Author Share Posted May 12, 2022 Ahh, thanks! This part of the documentation confused me with the '= mrNo' stuff. http://www.unigui.com/doc/online_help/api/uniGUIDialogs_MessageDlg@string@TMsgDlgType@TMsgDlgButtons.html Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 13, 2022 Share Posted May 13, 2022 9 hours ago, delphilearner said: This part of the documentation confused me with the '= mrNo' stuff. If I understand you correctly, then you need to use Synchronous Mode: 9 hours ago, Sherzod said: http://www.unigui.com/doc/online_help/synch-and-asynch-operations.htm Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.