background image
C H A P T E R 3
Views
Using Views
3-41
GetDropDataScript
-- is sent to the source view when the destination view
is found.
ViewDropScript
-- is sent to the destination view. You must add the object to
the destination view.
ViewDropMoveScript
-- is sent to the source view. It is used when dragging
an object within the same view.
ViewDropRemoveScript
and
ViewDropScript
are not called in this case.
ViewDropRemoveScript
-- is sent to the source view. It is used when
dragging an object from one view to another. You must delete the original from
the source view when the drag completes.
Additional optional methods can also be added. If you do not include these, the
default behavior occurs.
ViewDrawDragDataScript
-- is sent to the source view. It draws the image
that will be dragged. If you don't specify an image, the area inside the rectangle
specified by the
DragAndDrop
bounds parameter is used.
ViewDrawDragBackgroundScript
-- is sent to the source view. It draws
the image that will appear behind the dragged image.
ViewFindTargetScript
-- is sent to the destination view. It lets the
destination view change the drop point to a different view.
ViewDragFeedbackScript
-- is sent to the destination view. It provides
visual feedback while items are dragged.
ViewDropDoneScript
-- is sent to the destination view to tell it that the
object has been dropped.
Scrolling View Contents
3
There are different methods of scrolling a view, supported by view methods you
call to do the work. Both methods described here operate on the child views of the
view to which you send a scroll message.
One method is used to scroll all the children of a view any incremental amount in
any direction, within the parent view. Use the
SetOrigin
method to perform this
kind of scrolling. This method changes the view origin by setting the values of the
viewOriginX
and
viewOriginY
slots in the view.
Another kind of scrolling is used for a situation in which there is a parent view
containing a number of child views positioned vertically, one below the other. The
SyncScroll
method provides the ability to scroll the child views up or down the
height of one of the views. This is the kind of scrolling you see on the built-in
Notepad application.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна