Lazarus

Programming => Operating Systems => Android => Topic started by: shyub on April 20, 2021, 03:26:22 pm

Title: Analogue of MessageDlg
Post by: shyub on April 20, 2021, 03:26:22 pm
Hello!
Faced such a problem that the displayed message "ShowMessage" closes very quickly.
Are there any other messages in LAMW that are closed only after clicking on the button, like, for example, in Windows "MessageDlg"?
Title: Re: Analogue of MessageDlg
Post by: rsu333 on April 20, 2021, 04:31:01 pm
Probably custom message work as this.
Title: Re: Analogue of MessageDlg
Post by: shyub on April 20, 2021, 05:26:16 pm
rsu333, you probably did not understand me. I need to display a message that would not close until the user reads it and clicks the "OK" button.
Below is an example. I am doing a setup that cuts with a laser. In the event of an emergency stop, a message should appear, for example "laser overheating". How do I keep this message on the screen until the user reads it?
Title: Re: Analogue of MessageDlg
Post by: Handoko on April 20, 2021, 05:39:01 pm
I can be wrong but I don't think Android allows a non-full-screen form (or dialog or message box) on top of current screen. Not sure but maybe you can draw a custom box with some texts inside it to show on the screen. Or maybe display a new 'screen'. You can try the demo that bundled with LAMW installation, if you click a demo then a new screen will show up, which actually is a full-screen form.
Title: Re: Analogue of MessageDlg
Post by: shyub on April 20, 2021, 06:08:48 pm
I would like the message to appear in the center of the screen. Once upon a time on "Embarcodero C ++ Builder-6.0" I made a small program in which it turned out. But due to the tightening of the copyright law, I switched to Lazarus and I would like to repeat this ...
Title: Re: Analogue of MessageDlg
Post by: shyub on April 20, 2021, 06:17:31 pm
If LAMW does not support such dialogs, then in the center of the screen I will place a panel containing a button and a message. In normal mode, it will have the "Visible: = false" property, and if necessary, I will change the message text and make the panel visible.
It is right?
Title: Re: Analogue of MessageDlg
Post by: Handoko on April 20, 2021, 06:32:34 pm
I haven't tried but I believe that should work.
Title: Re: Analogue of MessageDlg
Post by: jmpessoa on April 20, 2021, 11:24:05 pm

What about jCustmDialog?
What about jDialogYN?
What about jModalDialog?

You can find some example in folder "demos" ..
Title: Re: Analogue of MessageDlg
Post by: shyub on April 21, 2021, 06:13:54 am
Thank you!
Title: Re: Analogue of MessageDlg
Post by: rsu333 on April 21, 2021, 02:29:10 pm
What I want to say ,JMPESSOA mansion it correctly .LAMW provides extreme and excellent facilities , I need to study more . 
TinyPortal © 2005-2018