ImageEn, unit iexLayers

TIELineLayer.LabelPosition

TIELineLayer.LabelPosition


Declaration


property LabelPosition: TIELineLabelPos;


Description


Specifies the position and visibility of the text label.
Value Description
ielpHide Does not show the text label even if text has been specified
ielpAtStart Shows the text label at the start of the line
ielpAtEnd Shows the text label at the end of the line
ielpAbove Shows the text above the line (without any border or background)
ielpBelow Shows the text below the line (without any border or background)
ielpAutoAbove Always shows the text above the line and automatically flips the text it is upright (i.e. it is above regardless of the rotation)
ielpAutoBelow Always shows the text below the line and automatically flips the text it is upright (i.e. it is below regardless of the rotation)


Default: ielpAtEnd


Examples


// Move the label to the start of the line
TIELineLayer( ImageEnView1.CurrentLayer ).LabelPosition := ielpAtStart;

// Hide labels of all line layers when user clicks a check box
procedure Tfmain.chkShowLabelsClick(Sender: TObject);
var
  I: integer;
begin
  ImageEnView1.LockUpdate();
  for I := 0 to ImageEnView1.LayersCount - 1 do
    if ImageEnView1.Layers[ I ].Kind = ielkLine then
    begin
      if chkShowLabels.Checked then
        TIELineLayer( ImageEnView1.Layers[ I ]).LabelPosition := ielpAtEnd
      else
        TIELineLayer( ImageEnView1.Layers[ I ]).LabelPosition := ielpHide;
    end;
  ImageEnView1.UnlockUpdate();
end;


See Also


- LabelAlignment
- LabelFont
- LabelShape
- LabelText
- LabelHorzMargin
- LabelVertMargin