[Lazarus] Dropping files on TCustomEdit

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Dropping files on TCustomEdit

Free Pascal - Lazarus mailing list
Hi List.

In my application i have started testing dropping files onto the main
form. Most of the components i am using on the form
happily accepts the file drops, but apparently this does not seem to be
the case with any decendants of TCustomEdit (eg. TEdit, TMemo).

On the main form i have checked the property "AllowDropFiles" to true,
and i've implemented a OnDropFiles method too. The procedure is
correctly activated when dropping files almost everywhere, just for the
exceptions of TCustomEdits...

Is this considered a bug, a feature or do i need to do something special
in regards to TCustomEdits?

My system:
Lazarus 1.9.0 r55954M FPC 3.0.0 x86_64-linux-gtk2

I have not tested if this is the case for Win32/64 too though...

Kind regards,
Torsten Bonde Christiansen
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Dropping files on TCustomEdit

Free Pascal - Lazarus mailing list
It works fine in Lazarus 1.9.0 r55993 FPC 3.0.2 i386-win32-win32/win64.

Perhaps a Linux or GTK2 only issue.

Denis


On 06/10/2017 09:47, Torsten Bonde Christiansen via Lazarus wrote:

> Hi List.
>
> In my application i have started testing dropping files onto the main
> form. Most of the components i am using on the form
> happily accepts the file drops, but apparently this does not seem to
> be the case with any decendants of TCustomEdit (eg. TEdit, TMemo).
>
> On the main form i have checked the property "AllowDropFiles" to true,
> and i've implemented a OnDropFiles method too. The procedure is
> correctly activated when dropping files almost everywhere, just for
> the exceptions of TCustomEdits...
>
> Is this considered a bug, a feature or do i need to do something
> special in regards to TCustomEdits?
>
> My system:
> Lazarus 1.9.0 r55954M FPC 3.0.0 x86_64-linux-gtk2
>
> I have not tested if this is the case for Win32/64 too though...
>
> Kind regards,
> Torsten Bonde Christiansen

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Dropping files on TCustomEdit

Free Pascal - Lazarus mailing list
On Sat, Oct 7, 2017 at 3:29 PM, Denis Kozlov via Lazarus
<[hidden email]> wrote:
> Perhaps a Linux or GTK2 only issue.

Probably a widgetset issue.
Torsten, please test with LCL-QT, too.

Juha
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Dropping files on TCustomEdit

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
Just tested with Ubuntu 16.04 + GTK2 widgetset and got a slightly
different issue.

Both TMemo and TEdit accept the dropped file and form's OnDropFiles
event gets called. However, the control that was under the cursor at the
time of the drop gets a file path of the dropped file inserted at the
cursor location in a form "file:///dropped/path", which happens outside
of the user code and occurs after the OnDropFiles event is called. This
is certainly not a desired nor consistent behaviour.

That was with Lazarus 1.9.0 r55993 FPC 3.0.2 x86_64-linux-gtk2

It is worth checking if other widgetsets experience similar issues.

Denis


On 06/10/2017 09:47, Torsten Bonde Christiansen via Lazarus wrote:

> Hi List.
>
> In my application i have started testing dropping files onto the main
> form. Most of the components i am using on the form
> happily accepts the file drops, but apparently this does not seem to
> be the case with any decendants of TCustomEdit (eg. TEdit, TMemo).
>
> On the main form i have checked the property "AllowDropFiles" to true,
> and i've implemented a OnDropFiles method too. The procedure is
> correctly activated when dropping files almost everywhere, just for
> the exceptions of TCustomEdits...
>
> Is this considered a bug, a feature or do i need to do something
> special in regards to TCustomEdits?
>
> My system:
> Lazarus 1.9.0 r55954M FPC 3.0.0 x86_64-linux-gtk2
>
> I have not tested if this is the case for Win32/64 too though...
>
> Kind regards,
> Torsten Bonde Christiansen

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus