Re: insert position on Gtk::Editable



Well,
I guess I just didn't look hard enough......
To save someone else that experiences the same problem a lil time, I found the answer at:
http://projects.prosa.it/gtkperl/reference.html
* Main Gtk module documentation
in that PDF I found "current_pos()" which returned the current position of the cursor. It seems to have worked well with set_point().

Thanks,
Eric





From: "Eric Hil" <anhkra hotmail com>
To: gtk-perl-list gnome org
Subject: insert position on Gtk::Editable
Date: Sat, 22 Mar 2003 00:58:42 -0500

Hello,

Recently i have discovered how much fun Gtk/Perl is, And now can't get enough of it.

Anyways, My question is.......
I read through many tutorials and search this mail archive and the web. However I have only found one reference to the issue that I'm experiencing. It was posted in 1998 and have no responding messages :(

 " Hi,

for an insert function in a text widget I need to insert text at the
cursor.

If I just use gtk_text_insert the text is inserted after the last
characyter wich is typed, so not the place of the cursor if you used
the cursor keys to move it away there!

gtk_text_get_point() also returns this point, and not the point of the
actual cursor position. How do I get the actual cursor position?".

I am experiencing the same issue where $widget->get_point() and $text->get_length() are initially returning the same value. Unless I set the cursor at my desired insert point and perform some keystroke such as space or arrow key.

Is there any documentation or reference somewhere that might explain a solution to this? where one could focus the cursor to the desired position and the widget function could return that as the insert point?

Thanks,
   Eric







_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail




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