Hello all.
I am trying to allow a user to add an item (a location name for example) to a list already populated with some defaults. I want to be able to type the name into a text box and use a button to add it to the list box or option box contents.
Is this possible?
Cheers
Grahame
add an item to an option box or list box
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: add an item to an option box or list box
Hi Grahame,
sure it is
But for claritys sake please do not use non-Livecode termini like BOX, there is no BOX object in Livecode
We have (text) FIELDS and OPTION MENUS (which are in fact buttons, but what the egg...)
What part is not clear to you:
1. Getting user input with ASK or getting the content of an existing field?
2. Appending a CR & the new entry to a FIELD or to -> the text of btn "your optionmenu"?
3. Both of them?
Best
Klaus
sure it is
But for claritys sake please do not use non-Livecode termini like BOX, there is no BOX object in Livecode
We have (text) FIELDS and OPTION MENUS (which are in fact buttons, but what the egg...)
What part is not clear to you:
1. Getting user input with ASK or getting the content of an existing field?
2. Appending a CR & the new entry to a FIELD or to -> the text of btn "your optionmenu"?
3. Both of them?
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 9833
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: add an item to an option box or list box
In addition to the fields and option controls Klaus mentioned, there's also a comboBox control, which allows user input. To capture that input and append it to the list you can trap the closeField message, get the label of the control, and then append it as Klaus showed with his Ask example.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn