[Glade-users] Glade 3 TreeView & TreeSelection
- From: alexey.kurochkin at pathfinderlwd.com (Alexey Kurochkin)
- Subject: [Glade-users] Glade 3 TreeView & TreeSelection
- Date: Mon, 21 Dec 2009 08:32:32 -0600
On Sat, 2009-12-19 at 12:25 -0500, Lex Berezhny wrote:
Hi,
I want to attach a call back to a TreeView so that when a row is
selected (single click) my function is called.
I can do this programmatically outside of Glade by grabbing the
selection object of the TreeView and then attaching to the selection
objects "changed" event. I can't figure out how to do the same in
Glade 3.
I do see that I can create a GtkTreeSelection object in the Glade
interface and attach to its "changed" event but how do I add that
selection to my TreeView?
As far as I understand, GtkTreeSelection object is completely internal
to a particular instance of a GtkTreeView. It isn't exposed as a
property, and there's no public method provided to attach arbitrary
selection to a given tree view. I am not sure why GtkTreeSelection even
exposed in glade palette, as creating such an object without being able
to associate it with a tree view is largely useless exercise. I guess
it's theoretically possible to expose internal selection object, say, as
a tab in the tree view editor in glade, but I'm not aware if anybody's
working on implementing it. By the way, there's a bug open about it some
years ago, in case you want to track it (or even fix it for that
matter): https://bugzilla.gnome.org/show_bug.cgi?id=383766
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]