talwyn has asked for the wisdom of the Perl Monks concerning the following question:
Basically I want the equivalent of the pascal readln or perl $input = <STDIN>; from within a textbox.I tried using the Change() event to use the Text() method; this does allow me to gain access to the information entered. However it does not tell me whether the information was committed to by the user (i.e. they pressed the return key). I don't want to use a button if I can get away with it.
Any ideas?
Talwyn </code>
sub ::tfLoad_TapeName_Change{ defined(my $win = $Win32::GUI::Loft::window{winMain}) or return(1); my $inputchar = $win->tfLoad_TapeName->Text(); assert ("tfLoad_TapeName()",$inputchar ne '',"Did not read charact +er!\n"); print_dbg ("tfLoad_TapeName_Change()","I read in:'$inputchar'\n"); if ( index ($inputchar,"\r") > -1){ print_dbg ("tfLoad_TapeName_Change()","Carriage return has bee +n detected ! Yeah!\n"); } print_dbg ("tfLoad_TapeName_Change()","I AM A STUB FIX ME!"); return (1); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I recognize that the user has pressed enter inside a text box? Win32::GUI Question
by dree (Monsignor) on Jul 02, 2002 at 09:39 UTC | |
|
Re: How do I recognize that the user has pressed enter inside a text box? Win32::GUI Question
by BrowserUk (Patriarch) on Jul 02, 2002 at 01:58 UTC |