Autor Beitrag
Ratchet
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63

Windows7 x86
D5 Ent., D2006 Arch.
BeitragVerfasst: Di 07.06.05 09:34 
Ich habe ein Image welches beim OnClick Ereignis bestimmte Dinge ausführt. Zusätzlich möchte ich noch Drag & Drop zum Image hinzufügen. ich habe mir gedacht das ich einfach beim MouseDown Event

ausblenden Delphi-Quelltext
1:
Image1.BeginDrag(False, 5);					


aufrufen und fertig wär die Sache. Tja, doch wenn ich das mache wird das OnClick Event vor OnMouseDown ausgeführt. Mein Drag und Drop wird ignoriert.
Einfaches Beispiel:

Beim OnClick ein Close ausführen, beim OnMouseDown ein BeginDrag. Clickt man nun auf Das Image wird die Form sofort geschlossen. Wird statt des BeginDrag ein ShowMessage gemacht klappt alles.
Was mach ich denn dagegen?


Zuletzt bearbeitet von Ratchet am Di 07.06.05 12:48, insgesamt 1-mal bearbeitet
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 07.06.05 10:26 
Wie wärs mit DragMode = dmAutomatic, dann wird der Drag-Vorgang automatisch gestartet...
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 07.06.05 10:29 
Ok, ich merk schon, das geht nicht, dann wird onClick nicht mehr ausgelöst :oops: , ich probier mal was anderes...

//edit:
Also jetzt im Moment krieg ichs auch nicht hin, mal sehen, ob ich noch was finde...
Ratchet Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63

Windows7 x86
D5 Ent., D2006 Arch.
BeitragVerfasst: Di 07.06.05 12:47 
Genau, DragMode = dmAutomatic bringt hier leider nix.