<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hi, I would like to be able to make the text in a text edit box highlighted via script. I'd like to be able to type in a string, hit enter, have the script store that value and do its thing, then put the focus back on the text edit box for further entry. Below is a stripped down example of what i'm trying to do.
Thanks,
Mike
Clear Log();
Names Default To Here( 1 );
Fn = function({x},
myText = teb << get text();
show(myText);
teb << set selected(); // <-- here's where i'm trying to select the text edit box.
);
win = new window("title",
vlistbox(
teb = text edit box(""),
buttonbox("Test", Fn(1))
)
);
teb << set script(Fn(1)); // runs the "Fn" function when the enter key is pressed within the text edit box.
Thanks. That solves part of the problem, which was bringing focus back to the edit box after clicking on the button box. Do you know how to bring focus back to the edit box after entering in data and hitting 'enter' key?
-Mike
You could try this:
buttonbox("Test", Fn(1), <
-Dave