Re: some GtkEntry questions



For the second question:

    gtk_window_set_focus(GTK_WINDOW(parent_win), widget_to_be_focused);

For the first -- I dunno, but I think it's better for your program to
let the cursor at it's position, that's why you made the selection, so
that user can type anything else than the automatically completed text.

However, I think the problem is that you move the cursor after you
select some region -- moving the cursor clears the selection.

Some barbarian example of a GtkEntry usage at
http://www.sourceforge.net/projects/gmrun -- my project, it's a
"run-program" utility featuring completion.

Cheers,
Mishoo

On Tue, 15 May 2001, Alexey Oparin wrote:

Hello all,

I have a GtkEntry and handler connected to "changed" signal. I want to get
behaviour like mozilla url entry. Into the handler i set text into the entry,
set selection for added text and move cursor to the end of string. After
handler finished the cursor moves to the position which was befor handler's
call and selection disappears. What is wrong?
The gtk_signal_emit_stop_by_name does not help me.
Defining two functions: first for made changes into entry text and second for
made selection and connected one after other to the "changed" signal also
does not get desirable result. Selection and cursor positioning works only if
i make it iwith handler for another signal.

How can i set the cursor into the entry field into a program without clicking
on them or setting focus with keyboard?

Alesha.

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






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