cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Eduardo
Level III

Selecting active Tab from Tab Box when a numbereditbox is present (JMP 13)

Hello All !!

 

I'm having a somewhat weird issue. In the code below I create a window with two tabs. When the numberditbox is present the command tab << Set Selected(1) has no effect and the Tab 2 is always selected. When I comment the numbereditbox the command tab << Set Selected(1) works fine and I can select the first of second tab. But I need the numbereditbox of course. I'm using JMP 13. Any help appreciated! Thanks!

 

All the best,

 

Eduardo

 

nx0=New Window( "Input",<<modal,
	tab=Tab Box(
		"Files", 
		lineupbox(ncol(2),
		textbox("Open file"),
		),		
			
		"Values",
		lineupbox(ncol(1),
			textbox("Setting one"),numone0=numbereditbox(2),
		),
		
	),
	
	tab << Set Selected(1),
	
	hlistbox(
	btok=button box("OK",numone=numone0<<get),
	btcanc=button box("Cancel",Close All(Journals,Reports,NoSave);clear globals();clear symbols();cancel_flag=1),
	),
);

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
gzmorgan0
Super User (Alumni)

Re: Selecting active Tab from Tab Box when a numbereditbox is present (JMP 13)

Use the NumberColEditBox it does not have this problem

nx0=New Window( "Input", <<Modal,
	tab=Tab Box(
		"Files", 
		lineupbox(ncol(2),
		textbox("Open file"),
		),		
			
		"Values",
	     lineupbox(ncol(1), 
	       TextBox("Setting one"),
            numone0=NumberColEditBox("",{2})
        )
	), //end TabBox
	
	tab << Set Selected(1),
	
	
	hlistbox(
	btok=button box("OK",numone=numone0<<get),
	btcanc=button box("Cancel",Close All(Journals,Reports,NoSave);clear globals();clear symbols();cancel_flag=1),
	),
);

View solution in original post

Re: Selecting active Tab from Tab Box when a numbereditbox is present (JMP 13)

Greetings - thank you for reporting this issue. For anyone finding this thread, i can confirm that it has been addressed in JMP 15. 

View solution in original post

5 REPLIES 5
gzmorgan0
Super User (Alumni)

Re: Selecting active Tab from Tab Box when a numbereditbox is present (JMP 13)

Eduardo,

 

Your script works in JMP 12 (as you probably know).  Remove << Modal,  and your script will work. I thought I documented this, but maybe not: I cannot find a tracking number and the bug persists in JMP 14.

 

This issue is that the number edit box acts like a number is typed with no return, meaning it is active/selected.

Even if the DisplayBox is created first then referenced to in the window, it is still active. Note if it is disabled, the first tab is selected.  So the problem is with NumberEditBox and Modal.

 

Either your Dialog needs to be non-modal or use TextEditBox and convert it to a Number or maybe JMP Support has a work around. 

 

lub = lineupbox(ncol(1),
	TextBox("Setting one"),
    numone0=NumberEditBox(2);
);
//numone0 << enable(0);

nx0=New Window( "Input", <<Modal,
	tab=Tab Box(
		"Files", 
		lineupbox(ncol(2),
		textbox("Open file"),
		),		
			
		"Values",
	     lub

		
	),
	tab << Set Selected(1),
	
	
	hlistbox(
	btok=button box("OK",numone=numone0<<get),
	btcanc=button box("Cancel",Close All(Journals,Reports,NoSave);clear globals();clear symbols();cancel_flag=1),
	),
);
gzmorgan0
Super User (Alumni)

Re: Selecting active Tab from Tab Box when a numbereditbox is present (JMP 13)

Just an update. Here is the tracking number and JMP Support reply. I looked for a defocus or a click or a status property, other than Enable(0|1), but found none.

 

JMP 13 and 14 Number Edit Box

 

With a modal New Window, JMP knows that the user must do something or cancel out of the dialog.  So when one or more edit boxes are included in the window, JMP sets focus on the first one it encounters.  

 

The last time I checked, there was no scriptable way to override it - other than to change the window, as you noted on the Discussion thread.  I am double-checking on it to see if anything has changed with v14.  Will let you know what I learn.

 

 

 

 

gzmorgan0
Super User (Alumni)

Re: Selecting active Tab from Tab Box when a numbereditbox is present (JMP 13)

Use the NumberColEditBox it does not have this problem

nx0=New Window( "Input", <<Modal,
	tab=Tab Box(
		"Files", 
		lineupbox(ncol(2),
		textbox("Open file"),
		),		
			
		"Values",
	     lineupbox(ncol(1), 
	       TextBox("Setting one"),
            numone0=NumberColEditBox("",{2})
        )
	), //end TabBox
	
	tab << Set Selected(1),
	
	
	hlistbox(
	btok=button box("OK",numone=numone0<<get),
	btcanc=button box("Cancel",Close All(Journals,Reports,NoSave);clear globals();clear symbols();cancel_flag=1),
	),
);
Eduardo
Level III

Re: Selecting active Tab from Tab Box when a numbereditbox is present (JMP 13)

Thanks a lot gzmorgan0 for sharing this workaround! 

It works indeed! 

 

All the best,

 

Eduardo

Re: Selecting active Tab from Tab Box when a numbereditbox is present (JMP 13)

Greetings - thank you for reporting this issue. For anyone finding this thread, i can confirm that it has been addressed in JMP 15.