Re: Question on gtk_label_set_selectable



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris Vine wrote:
On Sat, 2007-10-20 at 10:11 +0100, Chris Vine wrote:
On Fri, 2007-10-19 at 16:54 +0200, Gian Mario Tagliaretti wrote:
2007/10/19, David NeÄas (Yeti) <yeti physics muni cz>:
On Fri, Oct 19, 2007 at 03:06:55PM +0200, Gian Mario Tagliaretti wrote:
You can also set the can-focus property to FALSE on the label which
will be still selectable.
Not exactly.  It will be only selectable *with mouse*.
Good point David, I didn't think of that.
GtkEntry has a gtk-entry-select-on-focus property to deal with this.
Probably GtkLabel should have a similar property - it might be worth
submitting a bug/feature report.

Actually, on looking it up, I see that there is this property
available, via the GtkSettings object - see gtk-label-select-on-focus
at http://library.gnome.org/devel/gtk/unstable/GtkSettings.html .

The following should do the trick, if the behaviour is wanted on an
application wide basis:

GtkSettings* settings = gtk_settings_get_default();
if (settings) {
  g_object_set(settings,
               "gtk-label-select-on-focus", FALSE,
               NULL);
}

Chris

Many thanks to all who responded on this question!

best rgds,

- -Greg

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


- --
+---------------------------------------------------------------------+

Please also check the log file at "/dev/null" for additional information.
                (from /var/log/Xorg.setup.log)

| Greg Hosler                                   ghosler redhat com    |
+---------------------------------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHGsWl404fl/0CV/QRAhuTAJ9DAukd8+fgQLSU0hKBt+Bgx4NF2wCgr0N4
qMjynNzkzU6O+TznIuDVg74=
=UeZ6
-----END PGP SIGNATURE-----



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