Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-10

Dropping files on TCustomEdit

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Torsten Bonde Christiansen

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

Reply by email

Denis Kozlov
to Torsten Bonde Christiansen

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

Torsten Bonde Christiansen wrote 22 lines
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

Reply by email

Denis Kozlov
to Torsten Bonde Christiansen: Hi List. In my application i have started testing dropping files onto the main form. Most…

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

Torsten Bonde Christiansen wrote 22 lines
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

Reply by email