Hello
I try to check for an entry in a database with a barcode scanner.
It will enter the number and gives an enter at the end whitch triggers the script of the "text edit box".
What doesn't work is to reset the focus back on the box to enter the next number.
Names Default To Here( 1 );
dt = current data table();
try(win1<<close window;);
my_expr=expr(
print(pnr << get text());
pnr << settext("");
pnr << setfocus(); // does not work, error message!
);
win1 = New Window( "Scan Window",modal,
V List Box(
Text Box( "Scan Serialnumber" ),
pnr = text edit box("",set width(160),set nlines(1),<<setscript(my_expr)),
h list box(
bb1 = Button Box( "Check",
print(pnr << get text());
pnr << settext("");
//pnr << setfocus();
),
bb2 = Button Box( "Cancel",
win1 << close window;
)
)
)
);
pnr << restore focus after click(1); // does not work!