Re: Problems with Gtk::Text and set_pointer and Text widget questions

"Fannin, David P." a écrit :


Before I post this to the Gtk list, I want to make sure I understand the
documentation myself.  It looks like the set_point routine is used to move
the insertion point to an arbitrary place.  I changed the code such that
clicking on one of the checkboxes called $text->set_point(4) and then
inserted text.  This worked without a problem.  However, when linking the
button_press routine to a button press associated with the Text widget, it
didn't work.  When I got to thinking about it, though, pressing the mouse
button in a Text widget probably calls set_point to move the insertion point
to where the mouse is.  I'm not sure it makes sense to call set_point in
association with a button_press event with the Text widget.  Maybe it would
help if you described what you're trying to do, because right now I'm

Yes you're right.
What I am trying to do is some kind of "shell" interface in a text
Thus, whenever the widget is activated, or wherever the user clicks, I
want the cursor (and insertion point, since it seems I wrongly confuse
both terms) to be set after a prompt, tht is, at the end of the text in
the widget.
For now, I can't achieve this, since I can click anywere, and type text
there, garbling the display. The only solution for now is to have a
separate widget to enter the commands, and another (not editable) to
display it. Not very convenient !


Michel Blanc
Centre Multimédia Erasme/Parc d'activités innovantes
69930 Saint Clément-les-places
Tel : +33-(0)4-74-70-68-40 / Fax : +33-(0)4-74-70-68-40

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