Vadim,

I have just read through your implementation of ROText and compared it to ROText and Text::Viewer in Perl/Tk. Now, I don't understand how Text is implemented in Tcl/Tk, because I don't know Tcl. In Perl/Tk Text is basically implemented as read-only (via method 'bindRdOnly') and then it gets some additional bindings for insertion and deletion. What ROText or Viewer does, is that it uses the bindRdOnly method, but it does not create any bindings for insertion and deletion afterwards. This way the widget is still selectable and all other bindings as well as cursor work as in normal text.
Do you think similar approach would be possible in Tcl::Tk?

Currently your ROText widget is a disabled Text, which means it doesn't take focus and consequently key bindings don't work. Yet I want to use the ROText for tagging text via simple key bindings. So I need to move cursor, make selections with keyboard and use my bindings to create tags from selection. I can use buttons now, but using mouse is too slow for this kind of work.

In case you would consider changing ROText implementation, please, have a look at Tk::Text::Viewer. It is basically ROText with some bindings for incremental search and an Entry for searching activated by familiar '/' key binding.
I find it very convenient.

In Perl/Tk both of these widgets are actually quite simple, but I have no idea, how much work would it be in Tcl/Tk to implement them.

Pavel

Reply via email to