Re: Spam ? - Re: Re: Treeview multiple selection behaviour



Here is a hint:

Connect handler on TreeView for button_press_event.
Remember position that should be selected when your dragging operation is done
Start dragging operation
Stop button_press_event by returning TRUE from your handler
Catch end/stop dragging signal
Change TreeView selection if needed

Victor Mierla wrote:

Pe data de Sun, 14 Sep 2003 13:27:59  0200, ai scris:
On Sun, 2003-09-14 at 11:23, Victor Mierla wrote:
Hi people

I'm writing a file-manager program which has 2 treeviews.
I want to drag and drop files from one treeview to another.
So i select 10 rows from 1 treeview for dragging.

But the treeview unselects all files when i click on selection. (GDK_BUTTON_PRESS).
Don't you believe it would be a normal behaviour for the treeview to unselect the selected rows at the release of the button (GDK_BUTTON_RELEASE)?

How am i supposed to drag not just 1 file but a selection??
Every other interfaces(QT,win,etc) works like this, only GTK has this problem.
I've seen that nautilus solved this problem somehow.

I guess, you're wrong. Usually selection is changing just when mouse button is pressed, any other behaviors should be implemented "manually".

Regards,
-andrew





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