Re: gtkwidget properties

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

 



Hello.

> What's the difference between the "is-focus" and "has-focus"
> properties of the gtkwidget?

GtkWidget::has-focus property indicates whether widget has global
focus, while GtkWidget::is-focus tells you if this widget is current
focus widget within it's toplevel. For example, let's say that you
have window with one GtkEntry and one GtkButton. When you click inside
GtkEntry, both is-focus and has-focus properties of this entry will be
true. If you now switch focus from your test window to some other
application, entry will have is-focus property set to true while
has-focus property is FALSE. Now you switch back to your application
and click your button. Your entry now has both properties set to
FALSE.

Hope this makes sense.

Tadej

-- 
Tadej Borovšak
tadeboro.blogspot.com
tadeboro@xxxxxxxxx
tadej.borovsak@xxxxxxxxx
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux