[Gambas-user] File Chooser Drag and Drop

Bruce Steers bsteers4 at gmail.com
Sun Jul 17 10:04:00 CEST 2022


On Sun, 17 Jul 2022 at 05:29, bb <adamnt42 at gmail.com> wrote:

> On Sun, 2022-07-17 at 00:22 -0400, T Lee Davidson wrote:
> > On 7/16/22 23:16, Bruce Steers wrote:
> > >
> > >
> > > On Sun, 17 Jul 2022 at 03:28, sbungay
> > > <sbungay at smartsonsite.com <mailto:sbungay at smartsonsite.com>> wrote:
> > >
> > >         Using the file chooser I want to drag one of the files from
> > > it
> > >     (represented by its icon) to a text area and on dropping it
> > > have the
> > >     text area load the file. Can't seem to get this to work, anyone
> > > have an
> > >     example project I can examine?
> > >
> > >
> > > Drag is not supported in File/Dir chooser
> > > You could import the filechooser files and modify them.
> > >
> > > BruceS
> >
> > Well ... I can imagine how disappointing that might be.
>

I'd say it's a bit of a drag ;) (see what i did there ;) )


> > Both FileChooser and DirChooser have a Drag method and Drag,
> > DragLeave, DragMove, and MouseDrag events leading one to believe
> > that they do support Drag & Drop. But, there is no mention in the
> > documentation that they do not.
> >
> >
> Not only that but the DblClick event is similarly "not available".
>
> I think that these issues are related to the fact that both controls
> use these events internally (and consume them). IOW you can drag files
> between directories, but I have no idea what it uses the DblClick event
> for, apart from it pops up a weird message.
>
> b
>
> p.s. I thought the DblClick might have been a solution but no.
>

Yeah DblClick is missing on many controls but it's usually replaced with
Activate for some reason.

I guess because it is a compound control made of a bunch of other controls
that all have their own DblClick and Drag methods.

that's why no Drag is supported with the FileChooser because it's the
FileView (or the DirView) controls inside the FileChooser that need to
start the Drag method not the FileChooser itself.

BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220717/c36b7142/attachment.htm>


More information about the User mailing list