How to create a modal card?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
AlessioForconi
Posts: 65
Joined: Sun Feb 15, 2015 2:51 pm

How to create a modal card?

Post by AlessioForconi » Mon Oct 29, 2018 4:32 pm

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

Klaus
Posts: 10486
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How to create a modal card?

Post by Klaus » Mon Oct 29, 2018 5:08 pm

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4702
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: How to create a modal card?

Post by jacque » Tue Oct 30, 2018 5:02 pm

I think he means the "sheet" command.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

ClintMA
Posts: 35
Joined: Thu Jan 21, 2016 2:52 am

Re: How to create a modal card?

Post by ClintMA » 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.

AlessioForconi
Posts: 65
Joined: Sun Feb 15, 2015 2:51 pm

Re: How to create a modal card?

Post by AlessioForconi » Tue Oct 30, 2018 8:10 pm

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

Thanks!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6236
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: How to create a modal card?

Post by FourthWorld » Tue Oct 30, 2018 10:24 pm

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
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”