Page 1 of 1

popovers and that auto locating arrow

Posted: Wed Jun 26, 2013 1:57 am
by Coffee1633
I noticed recently that popovers are starting to be used in iphone apps, too. For example dropbox has them (see attached image). I can't figure out how you would go about creating them in LC. Is it possible to create popovers for iphone or ipad for that matter (especially with the little arrow pointing to the control which the popover came from, automatically pointing to the correct spot)?

I see that there is a popup command so would I have to make a custom graphic with the arrow in the appropriate location for each button? But what about resizing and orientations changes? It would be nice to have a popover command that auto locates the arrow under the control that called it. Is that possible in LC at the moment?

coffee16

Re: popovers and that auto locating arrow

Posted: Wed Jun 26, 2013 2:56 am
by Jellicle
You can make the popover a group and include an image for the background, 2 transparent buttons for the buttons and a graphic object for the arrow. Then when you call your script to show the popover just include a parameter that specifies the location of the arrow. Something like:

on showPopover button1Label,button2Label, arrowLoc
set the label of btn 1 of group "popover" to button1Label
set the label of btn 2 of group "popover" to button2Label
set the loc of graphic "arrow" of group "popover" to 550,96
end showPopover

Gerry

Re: popovers and that auto locating arrow

Posted: Wed Jun 26, 2013 3:40 am
by Coffee1633
Thanks Gerry, good design idea. Very straight forward. I'll give it a try.

coffee16

Re: popovers and that auto locating arrow

Posted: Sun Jun 30, 2013 9:46 pm
by monte
You could always try mergPop ;-) Only iPad though. On iPhone popovers are not standard.