ImageEn, unit ievect

TImageEnVect.ObjTop

TImageEnVect.ObjTop


Declaration

property ObjTop[hobj: integer]: integer;


Description

Specifies the top offset of hobj object. The coordinates are in pixels with zoom = 100%.
When setting ObjTop, ObjBottom is also moved to maintain the original object width.

hobj is the ID of the object. You can also specify IEV_NEXT_INSERTED_OBJECT (-1) which refers to the next object to be inserted or IEV_PREVIOUS_INSERTED_OBJECT (-2) for the last object inserted.


Example

// This code creates a Box at 10, 10 of 50x50 pixels.
ImageEnVect1.ObjKind   [IEV_NEXT_INSERTED_OBJECT] := iekBOX;
ImageEnVect1.ObjLeft   [IEV_NEXT_INSERTED_OBJECT] := 10;
ImageEnVect1.ObjTop    [IEV_NEXT_INSERTED_OBJECT] := 10;
ImageEnVect1.ObjWidth  [IEV_NEXT_INSERTED_OBJECT] := 50;
ImageEnVect1.ObjHeight [IEV_NEXT_INSERTED_OBJECT] := 50;
ImageEnVect1.AddNewObject();


Transition Information

If you are transitioning your code to TImageEnView Layers, instead of ObjTop, use: TIELayer.PosY

ImageEnView1.CurrentLayer.PosY := 100;
ImageEnView1.Update();