Enable button box after pressing enter at a Number edit boxI have the following window:

What I am trying to do is to enable the 'Select data to import' button after pressing enter at the Number Edit window above.
docId = "xxxxxx";
WidthDescripWin = 500;
init_value =31;
win = New Window("Landing page for study evaluation add-in",
<<ON close=""></ON>the way that I am trying to do that without success is using the following piece of code:
where the enter_row_start() function just has the enable command.
Is it possible to do that?
what am I doing wrong?
Automation and ScriptingBasic Data Analysis and ModelingData AccessRe: Enable button box after pressing enter at a Number edit boxInclude this expression in the function you defined for the number column box.
bboxImp << Enable( 1 );
Re: Enable button box after pressing enter at a Number edit boxI believe that Mark was referring to the "Number Edit Box" not a "Number Column Box".
Re: Enable button box after pressing enter at a Number edit boxYou are on the right track. You just need to check the value of the number edit box as part of the function. Here is a simple example that you can apply to your script. The function below will also disable the button if the number edit box goes back to a missing value.
names default to here( 1 );
nw = new window( "Test Window",
panel box( "Instructions",
text box( "1. Input number \!r2. Press Enter \!r3. Press Run Analysis" )
),
panel box( "Data Entry",
h list box(
text box( "enter a number and hit Enter on your keyboard" ),
NEB = number edit box( ., << set function(
function( { thisBox },
if(
!is missing( thisBox << get ), bb1 << enable(1),
is missing( thisBox << get ), bb1 << enable(0)
)
)
))
)
),
panel box( "Actions",
h list box(
bb1 = button box( "Run Analysis" ),
button box( "End Analysis" )
)
)
);
bb1 << enable( 0 )