Author |
Topic  |
|
John
 
USA
94 Posts |
Posted - Apr 10 2012 : 15:59:02
|
Hello
If I create an iekLineLabel object in code (see example below), the text portion of the label at the end of the line (opposite the arrow) does not display.
procedure TformXrayMeasure2.DrawPutLineHoldingAngleDegrees(AngleType: String; Degrees: Extended; Color: TColor); var tempNewObj: TMarkerRecord; begin with ImageEnVect1 do begin ObjText[-1] := AnsiString('Test'); // ObjText[-1] := AnsiString(AngleType + ' = ' + IntToStr(Round(Degrees))); ObjTextAutoSize[-1] := True; ObjStyle[-1]:=[ievsSelectable, ievsMoveable, ievsSizeable, ievsVisible]; ObjFontHeight[-1] := 12; // default value is 11
ObjBeginShape[-1] := iesOUTARROW; ObjBrushStyle[-1] := bsSolid; ObjPenColor[-1] := Color; AddNewObject(iekLineLabel, Rect(42, 367, 325, 195), Color); { AddNewObject(iekLineLabel, Rect(Round(tempTwoLineIntercept_X), Round(tempTwoLineIntercept_Y), Round(tempTwoLineIntercept_X) + 200, Round(tempTwoLineIntercept_Y) - 200), Color); } end; end;
Suggestions
John
|
|
fab
   
1310 Posts |
Posted - Apr 12 2012 : 01:29:42
|
Please move ObjText[] after AddNewObject:
.... AddNewObject(iekLineLabel, Rect(42, 367, 325, 195), Color); ObjText[-2] := AnsiString('Test'); |
 |
|
John
 
USA
94 Posts |
Posted - Apr 13 2012 : 21:47:30
|
Fabrizio
Thanks.
John |
 |
|
|
Topic  |
|
|
|