View Single Post
# 4 01-03-2006 , 06:20 PM
Subscriber
Join Date: Dec 2004
Posts: 203
ok, I am thinking that I might be able to do this by queriing the textField. However, I can't seem to figure out how to do this. I have been doing a testing and here is my code so far but it only queries the field after I close the window or hit the return key which I don't want. What I want is it to query as soon as the user enters their first key. However here is the code so far...

{
string $text;
string $value;

window;
columnLayout;

$text = `textField "enteredText"`;
textField -edit -changeCommand("changeText()" )"enteredText";
}

proc changeText() {
string $value;

$value = `textField -q -tx "enteredText"`;
if (size($value) > 0) {
print("you have started to type\n");
}


so in other words, the procedure "changeText()", is not being called until I press the return key or close the window. Is there any way that I can do this when the user enter's their first key?


Last edited by junkyBob; 01-03-2006 at 06:23 PM.