Greetings!
I am working on a "console" window for my application, trying to provide
a place where users can have arbitrary Python commands interpreted in the
application's namespace. This is a "shell-like" interface, as opposed
to an editor-like interface -- new text gets added to the bottom, and
it has a command history, but once something appears in the window, it
doesn't change.
I had a previous problem with the input cursor's placement not
corresponding to the "point" or "position" of the GtkText/GtkEditable,
which I solved by making my GtkText widget non-editable, and handling
the keypress events myself.
I have run into another glitch. The GtkText is inside a GtkScrolledWindow
which is inside a GtkWindow. I want to use the "cursor-up" key event to
go back, line by line, through the command history. I can do this, but
the curosr-up key *also* scrolls the text backward by one line, causing
the newly-displayed line of text to appear off the bottom of the window.
I have a similar problem with "tab" key events, they switch the focus
out, and the key event itself never shows up at the GtkText level.
Does anyone know if there is a way to block key events from having
these side-effects? So far, I have tried returning gtk.TRUE from my
key event handler (attached to the GtkText's key-press-event), and
tried fiddling with the vertical scrollbar's event-mask, but neither of
these had any effect.
-- Andrew Reid
[EMAIL PROTECTED]
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/