Author |
Topic  |
|
AndyColmes
  
USA
351 Posts |
Posted - Sep 15 2013 : 00:36:03
|
I have 2 layers in a TImageEnVect, Layer 0 and 1. Layer 1 is resizeable and moveable. I created an rectangle object by setting the MouseInteractVT to [miputbox]. After creating the object, I am unable to select and resize the object. My code is as follows:
hobj := ImageEnView1.AddNewObject; ImageEnView1.ObjKind[hobj] := iekBOX; ImageEnView1.SetObjRect(hobj, nRECT ); ImageEnView1.ObjPenColor[hobj] := clLime; ImageEnView1.ObjPenWidth[hobj] := 2; ImageEnView1.ObjPenStyle[hobj] := psSolid; ImageEnView1.ObjStyle[hobj] := [ievsSelectable, ievsMoveable, ievsSizeable, ievsVisible];
Then in the OnNewObject event of the TImageEnVect, I set the MouseInteractVT to [miObjectSelect].
Where did I go wrong?
Thanks for any help.
|
|
klausdoege
  
Germany
389 Posts |
Posted - Sep 15 2013 : 01:00:00
|
Hello Andy, I know only imageenvect.addnewobject. Imageenview.addnewobject ??? Maybe, that is the problem.
Klaus www.klausdoege.de |
 |
|
w2m
   
USA
1990 Posts |
Posted - Sep 15 2013 : 05:22:52
|
You have to setup TImageEnVect to use specific layers for objects:
TImageEnVect.ObjLayer
Declaration property ObjLayer[hobj:integer]:integer;
Description Specifies layer index where the object is located (drawed and referenced). Default is "0" and means draw on layer 0.
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.
TImageEnVect.ObjAnchorToLayers
Declaration property ObjAnchorToLayers:boolean;
Description When true (default), all objects are anchored to a layer (using ObjLayer property). Otherwise (the old behavior) objects are just painted over all layers.
William Miller Adirondack Software & Graphics Email: w2m@frontiernet.net EBook: http://www.imageen.com/ebook/ Apprehend: http://www.frontiernet.net/~w2m/index.html |
 |
|
AndyColmes
  
USA
351 Posts |
Posted - Sep 15 2013 : 09:01:40
|
Hello William,
That did the trick. Thanks very much.
|
 |
|
|
Topic  |
|
|
|