Building Option Menu items on the fly

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Building Option Menu items on the fly

Post by thatkeith » Tue Mar 11, 2014 8:04 pm

This seems like something I really ought to know, but I just can't crack it: how can I (can I?) populate an Option Menu button with menu items by script?
I have a long list that's generated on the fly, and I want it to be presented in an Option Menu.
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

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

Re: Building Option Menu items on the fly

Post by Klaus » Tue Mar 11, 2014 9:07 pm

Hi Keith,

you want to "set the text of btn xyz" to your long CR delimited list :D
Don't forget to "escape" characters like / etc... if neccessary!


Best

Klaus

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Re: Building Option Menu items on the fly

Post by thatkeith » Tue Mar 11, 2014 9:47 pm

Ahh! I was thinking along the lines of the menuItems, but of course that got me nowhere. Thanks. :)
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

Post Reply

Return to “Talking LiveCode”