Page 1 of 1

How to create a modal card?

Posted: Mon Oct 29, 2018 4:32 pm
by AlessioForconi
Hello,

is it possible to create a modal card that opens from the menu bar, such as those that os x uses to get licenses accepted?

I would like to use it to insert data into two appropriately positioned fields.

Thank you

Re: How to create a modal card?

Posted: Mon Oct 29, 2018 5:08 pm
by Klaus
Buonasera Alessio,

a card can not be "modal" but the stack that contains it. So create a little stack with everything you need in it, and don't forget a button to close this later MODAL stack!, and just open it like:

Code: Select all

...
modal "your stack here..."
...
Is that what you mean?


Best

Klaus

Re: How to create a modal card?

Posted: Tue Oct 30, 2018 5:02 pm
by jacque
I think he means the "sheet" command.

Re: How to create a modal card?

Posted: Tue Oct 30, 2018 6:26 pm
by ClintMA
*Cross-platform note:* Sheets are only used on OS X|OS X systems. If you use the sheet command on a Mac OS, Unix, or Windows system, the stack is displayed as a modal dialog box and the parentStack parameter is ignored.

Re: How to create a modal card?

Posted: Tue Oct 30, 2018 8:10 pm
by AlessioForconi
jacque wrote:
Tue Oct 30, 2018 5:02 pm
I think he means the "sheet" command.
Yes, exactly.

Thanks!

Re: How to create a modal card?

Posted: Tue Oct 30, 2018 10:24 pm
by FourthWorld
ClintMA wrote:
Tue Oct 30, 2018 6:26 pm
*Cross-platform note:* Sheets are only used on OS X|OS X systems. If you use the sheet command on a Mac OS, Unix, or Windows system, the stack is displayed as a modal dialog box and the parentStack parameter is ignored.
Thanks for posting that, Clint. It's close, but misses a useful nuance about the sheet command worth noting - I've submitted an enhancement request for a clearer description:
https://quality.livecode.com/show_bug.cgi?id=21664