[Lazarus] Dropping files on TCustomEdit
Denis Kozlov
dezlov at gmail.com
Sat Oct 7 15:20:06 CEST 2017
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
More information about the Lazarus
mailing list