Page 1 of 1

dropdown/popup menus

Posted: Wed Apr 20, 2022 11:35 am
by marksmithhfx
Hi,

Does anyone know a way to do dropdown or popup menus on iOS that are native looking? I think support for this was added in iOS 14 via UIMenu and ContextMenu...

https://betterprogramming.pub/whats-new ... 3cd2037c37

If no one knows if this is possible I will add a feature request.

Cheers,
Mark

Re: dropdown/popup menus

Posted: Wed Apr 20, 2022 12:09 pm
by Klaus
Hi Mark,

I'm afraid until LC officially support this, you will need to "fake" it with groups.


Best

Klaus

Re: dropdown/popup menus

Posted: Fri Apr 22, 2022 9:09 pm
by marksmithhfx
Klaus wrote:
Wed Apr 20, 2022 12:09 pm
Hi Mark,

I'm afraid until LC officially support this, you will need to "fake" it with groups.
Thanks Klaus, interesting, how might one fake this in groups?

Also, posted an enhancement request for this in the QCC https://quality.livecode.com/show_bug.cgi?id=23689

Mark

Re: dropdown/popup menus

Posted: Sat Apr 23, 2022 12:09 pm
by Klaus
Hi Mark,

quick idea, create some buttons with an icon and AUTOHILITE = FALSE and this script and group them.

Code: Select all

on mouseEnter
   set the hilite of me to TRUE   
end mouseEnter

on mouseLeave
   set the hilite of me to FALSE
end mouseLeave

on mouseUp 
   ## Do your thing here...
   set the hilite of me to FALSE
end mouseUp

on mouseRelease
   set the hilite of me to FALSE   
end mouseRelease
Will surely need some more finetuning, but you get the picture. :-)


Best

Klaus

Re: dropdown/popup menus

Posted: Sat Apr 23, 2022 3:37 pm
by stam
marksmithhfx wrote:
Fri Apr 22, 2022 9:09 pm
Thanks Klaus, interesting, how might one fake this in groups?
This might be helpful either to use as is or perhaps give some ideas:

https://livecodeshare.runrev.com/stack/984/-skComboBox

Re: dropdown/popup menus

Posted: Sat Apr 23, 2022 6:31 pm
by jacque
I've used a simple list field sometimes if you don't need anything too fancy.

Re: dropdown/popup menus

Posted: Mon Apr 25, 2022 7:44 pm
by marksmithhfx
jacque wrote:
Sat Apr 23, 2022 6:31 pm
I've used a simple list field sometimes if you don't need anything too fancy.
Thanks everyone. After the Dev Con I'll get cracking trying these out.

Mark