Results 1 to 11 of 11

Thread: OnStartDrag, function sender

  1. #1
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default OnStartDrag, function sender

    what are the parameters needed in my function sender when the event is OnStartDrag?

    eg. procedure drag(sender: TObject, {What other parameters are needed?});

  2. #2
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    functionname( ctrl+space
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  3. #3
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    code hints aren't there when making a procedure...

  4. #4
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    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.

  5. #5
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    in scar tools -> event handlers list

    edit: Oh you got that part, but that still will help above.

    Question 2:
    SCAR Code:
    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
    Last edited by MylesMadness; 06-24-2010 at 10:06 PM.

  6. #6
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    thanks myles!!

  7. #7
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    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.

    I'm saying this because I could never get the Drag pointers to work.

  8. #8
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    In Simba you can see it from the object itself, for example "TPanel.OnStartDrag(" should show you the definition as well

  9. #9
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    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.

    I'm saying this because I could never get the Drag pointers to work.
    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.

  10. #10
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by ReadySteadyGo View Post
    code hints aren't there when making a procedure...
    sorry mate, alls I saw was what are the parameters
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  11. #11
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    no worries i'm terrible at explaining stuff.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •