[Gambas-user] Strange drag&drop

Benoit Minisini gambas at ...1...
Fri Nov 2 02:21:21 CET 2007


On vendredi 2 novembre 2007, Benoit Minisini wrote:
> On vendredi 2 novembre 2007, Benoit Minisini wrote:
> > On vendredi 2 novembre 2007, PxPert wrote:
> > > Hi!
> > > I'm an active gambas developer and I'm developing an app called
> > > lnkmusic (an inteface for mpd, see kde-apps.org for more info :D ) for
> > > gambas 1.9.90 I've got a very strange problem when dragging from a
> > > multiple selectable gridview to another control inside the form but
> > > outside the gridview: after the drop, if the mouse cursor keeps being
> > > outside the gridview and moves, it changes the selection of the rows in
> > > the control. When the cursor comes in, this fake select event
> > > disappears.
> > > How can I fix that?
> > > I've got some other ugly problems wihth drag&dron on a gridview, but
> > > for now this is the most horrible :P
> > >
> > > Thanks, PxPert
> >
> > I downloaded your project, but couldn't find any GridView anywhere. Did I
> > miss something?
>
> Spoke too fast... You created it dynamically.

Well, the drag & drop process interferes with the mouse selection, because 
they are launched during the same mouse event.

I added the ability to prevent mouse events to propagate with STOP EVENT. This 
solves the selection of rows while dragging outside of the controls. But 
there is other interferences yet.

The only clean solution at the moment should be settings GridView selection 
mode to Select.None, and implements a selection mechanism yourself, by 
managing mouse events, and drawing selected rows differently in the Data 
event.

Regards,

-- 
Benoit Minisini




More information about the User mailing list