> my ($start, $stop) = $textfield->Selection; And do you try it? I can't make it to work.... When there is no real selection it return something strange....
----- Original Message ----- From: Sean Healy To: <perl-win32-gui-users@lists.sourceforge.net> Sent: Saturday, April 12, 2003 4:46 PM Subject: Re: [perl-win32-gui-users] Push Button with the picture (bitbtn) > >And also I dont find possibility to put mask on textfield (such as > >dd/dd/dddd for date input), so I've made it by hands in Change event, but I > >can't get cursor position in textfield to put it on place. (by default > >cursor stands in the begining of the field when i make > >$textfield->Text($str), but i must put it in those place where it was > >before > >Change) > > my ($start, $stop) = $textfield->Selection; > my $text = $textfield->Text; > # > # alter text as desired > # > $textfield->Text($altered_text); > $textfield->Selection($start, $stop); > > You may want to move the position around, i.e., if you change MMDDYY to > MM/DD/YY and the cursor is between the two D's, you'll need to change the > cursor position or it will end up between the first slash and the first D. > > > _________________________________________________________________ > MSN 8 with e-mail virus protection service: 2 months FREE* > http://join.msn.com/?page=features/virus > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > for complex code. Debugging C/C++ programs can leave you feeling lost and > disoriented. TotalView can help you find your way. Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >