ObjSetHotSpot Method

Build 1501 on 14/Nov/2017  This topic last edited on: 23/Mar/2016, at 12:16

Description

Moves hot spot of the selection (one or more objects) to the specified position.

Syntax

errorcode = Page.ObjSetHotSpot (x,y,bMode)

x

x coordinate.

y

y coordinate.

bMode

True = coordinates refer to the whole page level; False = coordinated refer to the 'internal' object coordinates, useful to reset the hot-spot to the center or to any vertex.

Remarks

Returns error code.

Context

Page designer

Example

Reset hot spot to center of the single selected object:

if Page.getselectioncount=1 then

 dim w=Page.GetSelectionWidth

 dim h=Page.GetSelectionHeight

 Page.objsethotspot (w/2,h/2,false)   ' center hot-spot

end if

All hot-spot related commands:

HotSpotAt (ElementProp), HotSpotX (ElementProp), HotSpotY (ElementProp)

ViewHotSpot Function, ObjSetHotSpot Function