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
 New code to set TImageEnView text background color
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

xequte

38128 Posts

Posted - Feb 24 2017 :  13:48:53  Show Profile  Reply
 
I am upgrading my code to v6.

I want to have different background colors for ImageTopText and ImageInfoText,

Previously I used:

ImageEnMView.ImageTopText[i].Background := clInfoBk;
ImageEnMView.ImageInfoText[i].Background := clYellow;

how can I change my code for same result ?

thx



Please use the OnGetTextEx event:

procedure TForm1.ImageEnMView1GetTextEx(Sender: TObject; Index: Integer; Position: TIEMTextPos; var Text: WideString;
                                        Font : TFont; var BackgroundStyle: TBrushStyle; var BackgroundColor: TColor;
                                        var TruncSide: TIEMTruncSide);
begin
  case Position of
    iemtpTop  :	BackgroundColor := clInfoBk;
    iemtpInfo : BackgroundColor := clYellow;
  end;
  BackgroundStyle := bsSolid;
end;

https://www.imageen.com/help/TImageEnMView.OnGetTextEx.html

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: