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
 ImageEnMView.GetTextEx
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

John

USA
94 Posts

Posted - Nov 13 2015 :  07:42:15  Show Profile  Reply
Hello

Delphi XE8, ImageEn 6.2.1 and Windows 7 64 bit

In the code below, changing the font color of the BottomTextFont of a specific image works fine. However, if the currently remarked out BackgroundColor := clSkyblue is implemented, the anticipated background color of the BottomText is not implemented. I have attached an image of the font.color change below the code.



procedure TformViewScannedXrays.ImageEnMView1GetTextEx(Sender: TObject; Index: Integer; Position: TIEMTextPos; var Text: WideString; Font: TFont;
  var BackgroundStyle: TBrushStyle; var BackgroundColor: TColor; var TruncSide: TIEMTruncSide);
var
  tempFileName: String;
  tempExtension: String;
begin
  if Position = iemtpBottom then
    begin
      tempExtension := ExtractFileExt( Text );
      if IEExtToFileFormat( tempExtension ) = ioJPEG then
        begin
          tempFileName := tempPtCephPath + Text;
          tempFileName := Copy(tempFileName, 1, Length(tempFileName) -3);
          tempFileName := tempFileName + 'iev';
          if FileExists(tempFileName) = True then
            begin
//              BackgroundColor := clSkyblue;
              Font.Color := clRed;
            end
          else
            begin
//              BackgroundColor := clWhite;
              Font.Color := clBlack;
            end;
        end;
    end;
end;





Suggestions??

TIA

John

xequte

39104 Posts

Posted - Nov 15 2015 :  17:20:34  Show Profile  Reply
Hi John

You will also need:
BackgroundStyle := bsSolid;



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

John

USA
94 Posts

Posted - Nov 15 2015 :  21:15:29  Show Profile  Reply
Thanks

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