GtkTreeview::get_path_at_pos() possible bug?

From: Date: Sun, 11 Feb 2007 19:10:57 +0000
Subject: GtkTreeview::get_path_at_pos() possible bug?
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7682@lists.php.net to get a copy of this message
Hi all, Was working on a treeview class in which I wanted to be able to move the tree nodes around by drag & drop. I had been lookling at one of kksou's code samples, in which kksou remarked that the path returned by get_path_at_pos() appeared to be one row off. Since kksou was working on a simple list, this could be compensated for. In my experience however the drop destination sometimes was one row off, sometimes two, making the result rather unpredictable. Looking at the (x, y) coordinates returned by the drop event, I concluded that the y coordinate included the height of the column header, and get_path_at_pos() *doesn't know this*. Turning off the column headers, or subtracting the header height from the y coordinate, cured the problem. If one does want headers however, that would involve hard coding the header height since there is no way I know off to get the actual header height - which depends on things like character height and might vary between systems... Comments welcome. Cheers, -- André =========================================================== Ctrl-Alt-Del will henceforth be known as Hasta-La-Vista...

« previous php.gtk.general (#7682) next »