Choose Language Hide Translation Bar
Highlighted
avner8943
Occasional Contributor

Getting object handle in a loop

I'm trying to create a "number edit box" in a loop, but I also want to get the handle to the edit box.

this is my code

bi = {};
For( i = 1, i < 10, i++,

	 v << append(H List Box( Text Box( "enter_"||Char( i )), bi[i] =  Number Edit Box( 1 ,<<set width(35)) )); 
// v is v list box in new window );

but this is not working, Any one has an idea?

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
vince_faller
Super User

Re: Getting object handle in a loop

This worked for me. 

v = vlistbox();
bi = {};
For( i = 1, i < 10, i++,

	 v << append(H List Box( Text Box( "enter_"||Char( i )), bi[i] =  Number Edit Box( 1 ,<<set width(35)) )); // v is v list box in new window
 
);

new window("Test", 
	v
);
show(bi);

 

 

Vince Faller - Predictum

View solution in original post

1 REPLY 1
vince_faller
Super User

Re: Getting object handle in a loop

This worked for me. 

v = vlistbox();
bi = {};
For( i = 1, i < 10, i++,

	 v << append(H List Box( Text Box( "enter_"||Char( i )), bi[i] =  Number Edit Box( 1 ,<<set width(35)) )); // v is v list box in new window
 
);

new window("Test", 
	v
);
show(bi);

 

 

Vince Faller - Predictum

View solution in original post