DragItem.Constructor(r as RectControl, x as Integer, y as Integer, width as Integer, height as Integer, DragPicture as Picture)

From Xojo Documentation

Revision as of 14:12, 30 July 2012 by PLefebvre (talk | contribs) (Created page with '<ShowIf version=2012r1> {{ConstructorBox | name=Constructor | owner=DragItem | ownertype=class | scope=public | parameters=r as RectControl, x as Integer, y as [[Inte…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Constructor

DragItem.Constructor(r as RectControl, x as Integer, y as Integer, width as Integer, height as Integer [,DragPicture as Picture])

Creates a new DragItem. The parameter r is the RectControl that the drag originates from. The parameters x and y are the coordinates relative to this control. The parameters width and height are the size/bounds of the drag rectangle. If the optional DragPicture parameter is passed, it will be used instead of the default rectangle to indicate the size and shape of the dragged item during the drag.

Notes

Subsequent calls to AddItem also accept coordinates that are relative to that control (notes: moving the control after calling the constructor does not change the relative location of calls to AddItem, in other words the control's left/top at the time the constructor was called becomes the relative offset and does not change if the control moves in the interim).