Re: Gtk2::Entry question



On Fri, 2003-11-07 at 06:21, Cornel Ghiban wrote:
                        $e->set_text($text);
 
                        $e->set_position($e->get_position+length($h{$1}));
                        #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  }
          });
 
 The promblem is the cursor position is not where I want it to be, ie at the end of the text in the entry 
for example.

according to:
http://developer.gnome.org/doc/API/2.0/gtk/GtkEditable.html#gtk-editable-set-position
"...A value of -1 indicates that the position should be set after the
last character in the entry. Note that this position is in characters,
not in bytes."

hopefully that works for you.

-rm




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