Re: Problems with Gtk::Text and set_pointer and Text widget questions
- From: Michel Blanc <mblanc erasme org>
- To: "Fannin, David P." <dpf umr edu>
- Cc: "gtk-perl-list gnome org" <gtk-perl-list gnome org>
- Subject: Re: Problems with Gtk::Text and set_pointer and Text widget questions
- Date: Tue, 14 Aug 2001 16:14:18 +0200
"Fannin, David P." a écrit :
Michel,
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
confused.
Yes you're right.
What I am trying to do is some kind of "shell" interface in a text
widget.
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 !
Thanks,
Michel.
--
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]