eric256 has asked for the wisdom of the Perl Monks concerning the following question:
I am working with the Tk::LineNumberText widget. As an argument it takes the type of widget (has to be derived from Tk::Text) that you want the text part to be. I've been experimenting with Tk::CodeText and the results where good. Line numbers and highlighting was all working as it should. Then I saw the oh so nifty autoindent feature and turned that on for the CodeText widget. Now the CodeText widget binds to 'return' to do the indenting, and the LineNumberText wants to overright that binding to see that the user is on a new line. I've been tweaking LineNumberText to see if i can get it to play nice but i just don't seem to grasp the order of events with bindings. I had hoped that if i bound the 'return' event of the frame parenting the text widget, that it would get called after the text widgets own event. This is not the case, or at least doesn't appear to be.
Is there some way to have two bindings for a single event on a single widget OR to somehow use inheritance/parenting to acheive that same end. Obviously I could just hand modify both modules to play nice with the other, but i was hoping for some more general method that could be used to patch one or the other in hopes of future prosperity.
Thanks in advance for any assitance you can provide.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk bindings
by eserte (Deacon) on May 19, 2004 at 08:56 UTC | |
by eric256 (Parson) on May 19, 2004 at 16:38 UTC | |
|
Re: Tk bindings
by bbfu (Curate) on May 19, 2004 at 09:09 UTC |