Re: gtkentry -- avoiding unwanted focus
- From: Allin Cottrell <cottrell wfu edu>
- To: Olexiy Avramchenko <olexiy irtech cn ua>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtkentry -- avoiding unwanted focus
- Date: Fri, 14 Nov 2003 11:00:57 -0500 (EST)
On Fri, 14 Nov 2003, Olexiy Avramchenko wrote:
My app displays some named icons in a certain window. I'd like for
the user to be able to rename the icons, so the names are implemented
with gtkentries. However, I want the name entries to become focused
for editing only if the user clicks on them. At present, one or other
of the entry widgets always shows a blinking cursor when the parent
window is focused (even if they are all configured as not editable
until clicked). Suggestions on how to turn this off?
Use gtk_widget_grab_focus() on another widget - if you have smth like
"Ok"/"Cancel"/"Apply"
buttons, just focus default button.
Thanks -- that makes good sense. In this case I couldn't find another
handy widget to focus, but building on your suggestion I used
GTK_WIDGET_SET_FLAGS to make the background window focusable, gave it
focus, and the cursor is gone.
Allin Cottrell.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]