setting insertion point in GtkText



If you click in a GtkText window, the cursor is drawn in the correct spot,
but the insertion point remains at the last spot text was inserted.  The
only way I can find to update the insertion point is to type something.  How
can I get the insertion point to match where the cursor has been placed so
I can use gtk_text_insert() without having to type anything?

Looking at gtktext.c I'd say that the code for handling button_press_events
should do some of the work that goes on with key_press_event, namely the
computation of where in the text you're at.  The only difference should
probably be that with a button press event, you don't add any text, just
update the point values.
-- 
Michael J. Hammel           |
The Graphics Muse           | Tell me what you need, and I'll tell you how to
mjhammel@graphics-muse.org  | get along without it. -- Dilbert
http://www.graphics-muse.org



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]