ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 iekLineLabel
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

John

USA
94 Posts

Posted - Apr 10 2012 :  15:59:02  Show Profile  Reply
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  Show Profile  Reply
Please move ObjText[] after AddNewObject:

....
AddNewObject(iekLineLabel, Rect(42, 367, 325, 195), Color);
ObjText[-2] := AnsiString('Test');
Go to Top of Page

John

USA
94 Posts

Posted - Apr 13 2012 :  21:47:30  Show Profile  Reply
Fabrizio

Thanks.

John
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: