We don't bite newbies here... much | |
PerlMonks |
Re: cursor position in text widget and linenumbertextby liverpole (Monsignor) |
on Sep 15, 2009 at 14:22 UTC ( [id://795395]=note: print w/replies, xml ) | Need Help?? |
Hi balee,
I don't see in the documentation for Tk::LineNumberText anything about the method index() being available the way it is for Tk::Text. Having said that, though, it appears (to address your second question first) that you could access the subwidget like this:
Note, however, that the line my $text = $sw->{'text'}; breaks the OO encapsulation; you're not really supposed to be accessing the data from the Tk::LineNumberText object directly (and the interface could change in the future, leaving you out of luck!) Maybe you could suggest to the author of Tk::LineNumberText to put in a method to access the underlying Text object. For your first question, I'm not exactly sure what you're asking. The line $mw->bind('<question>' => [\&updateStatus]); shows how you could bind the question mark "?" to the subroutine, but it sounds like you're asking more about the cursor keys in particular. Can you be a bit more specific about what you're trying to do? s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
In Section
Seekers of Perl Wisdom
|
|