ImageEn, unit imageenview

TImageEnView.OnActivateTextEditor

TImageEnView.OnActivateTextEditor


Declaration

property OnActivateTextEditor: TIETextEditorEvent;


Description

Occurs whenever a text editor is activated for a TIETextLayer or TIELineLayer.


Example

procedure Tfmain.ImageEnView1ActivateTextEditor(Sender: TObject; Layer: Integer; Editor: TObject);
begin
  // Show Text Editor with Yellow background for Line Layers (always a TIEEdit)
  if ImageEnView1.Layers[ Layer ].Kind = ielkLine then
    TIEEdit( Editor ).Color := clYellow
  else
  // Show Text Editor with Gray background for Text Layers (may be TIERichEdit or TIEEdit)
  if Editor is TIEEdit then
    TIEEdit( Editor ).Color := clGray
  else
  if Editor is TIERichEdit then
    TIERichEdit( Editor ).Color := clGray;
end;