I'm assuming you want to get the contents of a text field, not text file ... ;-) There is the Text() method, defined as a general function, i.e. should be valid for all widgets. It returns all of a field's contents. If you want the bit that's selected:
($from, $to) = $Main->MyField->Selection() $selectedText = substr ($Main->MyField->Text(), $from, $to - $from); I'm not too sure about special cases (what are the values of Selection() when there is nothing selected, what if the selection includes the very last character, do you have to adjust the values by one for each crlf etc), but that's the basic idea. Have fun, Harald > -----Original Message----- > From: Steven Swenson [mailto:[EMAIL PROTECTED] > Sent: Monday, July 01, 2002 15:06 > To: perl-win32-gui-users@lists.sourceforge.net > Subject: [perl-win32-gui-users] How do I read the information in a > textbox? > > > Ok, This feels like a silly question. However the > documentation I have on > Win32::Gui does not seem to specify a method by which I can > actually read > the content of a text file. All select, selectAll do is tell > me they are > successful. And Change() is called for every character... so I hope > someone can give me a hand. > > --Steve > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >