cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.
  • See how to access JMP Marketplace - and - find, create & share add-ins to extend your JMP. Watch video.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
csoon1
Level III

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
vince_faller
Super User (Alumni)

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)
);
Vince Faller - Predictum

View solution in original post

2 REPLIES 2
vince_faller
Super User (Alumni)

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)
);
Vince Faller - Predictum
csoon1
Level III

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.

Recommended Articles