Recent

Author Topic: Analogue of MessageDlg  (Read 1641 times)

shyub

  • Full Member
  • ***
  • Posts: 124
Analogue of MessageDlg
« 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"?

rsu333

  • Full Member
  • ***
  • Posts: 110
Re: Analogue of MessageDlg
« Reply #1 on: April 20, 2021, 04:31:01 pm »
Probably custom message work as this.

shyub

  • Full Member
  • ***
  • Posts: 124
Re: Analogue of MessageDlg
« Reply #2 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?

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Re: Analogue of MessageDlg
« Reply #3 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.
« Last Edit: April 20, 2021, 05:40:32 pm by Handoko »

shyub

  • Full Member
  • ***
  • Posts: 124
Re: Analogue of MessageDlg
« Reply #4 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 ...

shyub

  • Full Member
  • ***
  • Posts: 124
Re: Analogue of MessageDlg
« Reply #5 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?

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Re: Analogue of MessageDlg
« Reply #6 on: April 20, 2021, 06:32:34 pm »
I haven't tried but I believe that should work.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Analogue of MessageDlg
« Reply #7 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" ..
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

shyub

  • Full Member
  • ***
  • Posts: 124
Re: Analogue of MessageDlg
« Reply #8 on: April 21, 2021, 06:13:54 am »
Thank you!

rsu333

  • Full Member
  • ***
  • Posts: 110
Re: Analogue of MessageDlg
« Reply #9 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