dropdown/popup menus

Getting into LiveCode for iOS? Ask your questions here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 939
Joined: Thu Nov 13, 2008 6:48 am

dropdown/popup menus

Post 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
macOS 15.6 (Sequola), Xcode 15.3, LC 10.0.2, iOS 18.6.2
Klaus
Posts: 14331
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: dropdown/popup menus

Post by Klaus »

Hi Mark,

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


Best

Klaus
marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 939
Joined: Thu Nov 13, 2008 6:48 am

Re: dropdown/popup menus

Post 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
macOS 15.6 (Sequola), Xcode 15.3, LC 10.0.2, iOS 18.6.2
Klaus
Posts: 14331
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: dropdown/popup menus

Post 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
stam
Posts: 3214
Joined: Sun Jun 04, 2006 9:39 pm

Re: dropdown/popup menus

Post 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
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7425
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: dropdown/popup menus

Post by jacque »

I've used a simple list field sometimes if you don't need anything too fancy.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 939
Joined: Thu Nov 13, 2008 6:48 am

Re: dropdown/popup menus

Post 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
macOS 15.6 (Sequola), Xcode 15.3, LC 10.0.2, iOS 18.6.2
Post Reply