ReadySteadyGo
2010-06-24 17:34:43
what are the parameters needed in my function sender when the event is OnStartDrag?
eg. procedure drag(sender: TObject, {What other parameters are needed?});
ReadySteadyGo
2010-06-24 17:54:30
code hints aren't there when making a procedure…
ReadySteadyGo
2010-06-24 17:57:23
i've looked it up on a pascal reference site.
TStartDragEvent = procedure (Sender: TObject; var DragObject: TDragObject) of object;
How do I create a TDragObject?
I am so confused.
MylesMadness
2010-06-24 18:01:49
in scar tools -> event handlers list
edit: Oh you got that part, but that still will help above.
Question 2:
procedure OnStartDrag(Sender: TObject; var DragObject: TDragObject);
var
P:TPoint;
begin
DragObject.Create;
P:=DragObject.DragPos;
DragObject.Free;
Writeln(IntToStr(P.x)+IntToStr(p.y));
end;
or somthing like that
Coh3n
2010-06-24 18:09:28
If you're working on the MSI location viewer (which I'm assuming you are), you don't need to use the OnDrag pointers, you can just reset the location of the image to the mouse position (if the mouse is clicked, of course). However, this is working for you, then great, just ignore me. :p
I'm saying this because I could never get the Drag pointers to work. :p
nielsie95
2010-06-24 18:10:16
In Simba you can see it from the object itself, for example "TPanel.OnStartDrag(" should show you the definition as well :)
ReadySteadyGo
2010-06-24 18:33:03
From: Coh3n
If you're working on the MSI location viewer (which I'm assuming you are), you don't need to use the OnDrag pointers, you can just reset the location of the image to the mouse position (if the mouse is clicked, of course). However, this is working for you, then great, just ignore me. :p
I'm saying this because I could never get the Drag pointers to work. :p
I started doing that then I saw the OnDrag pointers and presumed that's what I should be doing :) But yeh it's given me enough hassle.
noidea
2010-06-24 18:50:45
From: ReadySteadyGo
code hints aren't there when making a procedure…
sorry mate, alls I saw was what are the parameters :redface:
ReadySteadyGo
2010-06-25 10:28:04
no worries :) i'm terrible at explaining stuff.