Open a window or panel

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
hurleyr
Posts: 7
Joined: Mon Sep 12, 2011 9:03 am

Open a window or panel

Post by hurleyr » Sat Sep 17, 2011 8:57 am

HI,
I am creating an ipad App and I have a number of buttons on the screen. If the user clicks on a button I need to open some form of panel or window from which they have to make a selection by clicking on an icon.
Can anyone suggest the best way of doing this.
Thanks
Richard

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Open a window or panel

Post by Jellicle » Sat Sep 17, 2011 9:24 am

One way is to create a group that contains the buttons etc that they need to interact with, and also an opaque rectangle object behind the objects as the background. A group is an object that contains other objects, and can be hidden and shown with a simple command. Check out the user guide for more information on groups.

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

hurleyr
Posts: 7
Joined: Mon Sep 12, 2011 9:03 am

Re: Open a window or panel

Post by hurleyr » Sat Sep 17, 2011 9:36 am

Thanks Gerry.
I will look at groups. sounds the best way to do it.
Richard

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Open a window or panel

Post by Klaus » Sat Sep 17, 2011 11:36 am

Hi Richard,

why not create an extra card for this?
The user will not tell the difference :D


Best

Klaus

hurleyr
Posts: 7
Joined: Mon Sep 12, 2011 9:03 am

Re: Open a window or panel

Post by hurleyr » Sat Sep 17, 2011 12:08 pm

HI Klaus

Can a child card be a smaller size than the original card, as I only want the popup to take up part of the screen.

Richard

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Open a window or panel

Post by Klaus » Sat Sep 17, 2011 12:20 pm

Hi Richard,

no, card size = stack size, which is valid for ALL cards in that stack.
Changing one of these will affect the other one!

But one can always make it LOOK like that 8)
Or use groups, as already proposed.


Best

Klaus

CALL-151
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 206
Joined: Wed Oct 20, 2010 11:00 am

Re: Open a window or panel

Post by CALL-151 » Sat Sep 17, 2011 12:27 pm

Gerry's approach has worked well for me. You can even fade the group in/out by looping through opacity levels, but the speed in the simulator will not match the real device speed so be sure to test on hardware to get the effect you want.

SteveHanlan
Posts: 80
Joined: Fri Jul 09, 2010 6:28 pm

Re: Open a window or panel

Post by SteveHanlan » Wed Sep 21, 2011 12:13 am

One word of warning on this approach, (which I also use), is to make sure that any other controls outside the group are deactivated, otherwise the user can bypass the 'pop-up' selection

cheers

Steve

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Open a window or panel

Post by Dixie » Wed Sep 21, 2011 12:54 am

Steve ...

And one way to do that quickly is to display a 'rectangle' graphic on the card that is layered just behind the psuedo popUp group... set its opaque to true and its ink to 'noop', it will not be noticed by the user but will prevent the other controls outside the group from having their handlers fire...

be well

Dixie

Post Reply