It is a bit of a hack, but given a memo named Memo1 on a form named Form1 you could do something like this:
Does adding this further line work for you?Code: Pascal [Select][+][-] if Pos('Gtk2', WidgetSetClass.ClassName) > 0 then begin SetDragMode(dmManual); DragManager.DragImmediate:=False; end;
DragMode is for dragging controls, it has nothing to do with "dragging" text inside TMemo.
Would it not be more correct to write an On Drop handler, that does not allow the dropping of text, or, possibly, an OnDrag handler to prevent dragging?
I take it you mean dragging out of TMemo rather than dragging in?
Quote from: Munair on November 03, 2017, 06:42:45 amI take it you mean dragging out of TMemo rather than dragging in?Tomitomy is trying to prevent this.
I cannot reproduce this mouse action within TMemo on KDE, so it seems a LCL-GTK issue. When I try to drag selected text the cursor shows a small red circle until I leave the memo.My above workaround prevents the mouse from selecting and dragging text.