dropdown/popup menus

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

dropdown/popup menus

Post by marksmithhfx » Wed Apr 20, 2022 11:35 am

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 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

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

Re: dropdown/popup menus

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


Best

Klaus

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: dropdown/popup menus

Post by marksmithhfx » Fri Apr 22, 2022 9:09 pm

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 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

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

Re: dropdown/popup menus

Post by Klaus » Sat Apr 23, 2022 12:09 pm

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: 2682
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: dropdown/popup menus

Post by stam » Sat Apr 23, 2022 3:37 pm

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: 7235
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: dropdown/popup menus

Post by jacque » Sat Apr 23, 2022 6:31 pm

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: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: dropdown/popup menus

Post by marksmithhfx » Mon Apr 25, 2022 7:44 pm

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 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Post Reply

Return to “iOS Deployment”