- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How to Grab Items Inside a List Box and pass them to a simple List
I have a List Box that contains "n" items and I don't have control how many items are there. What I want is to simply grab each item and insert them to a list (for more processing). I thought I could simply pass a message "Select All" but I found out it does not work as how I imagined it to be.
Let me know if you have suggestions.
I was thinking of looping through each item in the list box and have each item "Set Selected" (so that I can Get Selected afterwards). My problem is that I don't know how to determine the number of items in the List Box. I'm not also sure if this idea works.
I appreciate any inputs. Thanks.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to Grab Items Inside a List Box and pass them to a simple List
a listbox() or a v/hlistbox()?
if it's a listbox() you can just listbox << Get Items.
If it's a vlistbox and you're using Jmp 13 you can do nitems(vlistbox) and loop through them.
if you're using jmp12- you have to do something like
Names Default to here(1);
new window("Test",
vlb = vlistbox(
textbox("1"),
textbox("1"),
textbox("1"),
textbox("1"),
textbox("1"),
textbox("1"),
textbox("1"),
textbox("1"),
)
);
l = {};
for(box = vlb<<child, !isempty(box), box = box << Sib,
insert into(l, box)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to Grab Items Inside a List Box and pass them to a simple List
a listbox() or a v/hlistbox()?
if it's a listbox() you can just listbox << Get Items.
If it's a vlistbox and you're using Jmp 13 you can do nitems(vlistbox) and loop through them.
if you're using jmp12- you have to do something like
Names Default to here(1);
new window("Test",
vlb = vlistbox(
textbox("1"),
textbox("1"),
textbox("1"),
textbox("1"),
textbox("1"),
textbox("1"),
textbox("1"),
textbox("1"),
)
);
l = {};
for(box = vlb<<child, !isempty(box), box = box << Sib,
insert into(l, box)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to Grab Items Inside a List Box and pass them to a simple List
@vince_faller. Thank you very much for a thorough answer. "Get Items" did the job for me as it was a ListBox and I am using JMP13.