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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageTopText/ImageInfoText/ImageBottomText in v6

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
xequte Posted - Mar 14 2015 : 15:34:51
In v6.0.0 we have made a number of change to TImageEnMView to improve memory and resource usage. One in particular was overhauling the text handling. In prior versions TImageEnMView required three font objects for every frame (which was fine in 2002, but much less so in 2015 where a folder may contain tens of thousands of images).

Unfortunately this may means some changes for upgraders.

Fonts are now set on a global basis, so rather than setting:

ImageTopText[idx].Font use TopTextFont once
ImageInfoText[idx].Font use InfoTextFont once
ImageBottomText[idx].Font use BottomTextFont once

(If you need to customize the fonts for particular cells - and I have not heard of this being used - use TImageEnMView.OnGetTextEx instead)


Also text objects are now strings rather than classes so replace all references to

ImageTopText[idx].Caption with ImageTopText[idx]
ImageInfoText[idx].Caption with ImageInfoText[idx]
ImageBottomText[idx].Caption with ImageBottomText[idx]

(i.e. just remove the ".Caption")


For other changes, please see the compatibility notes at the end of:

http://www.imageen.com/info/HistoryFull.html#6.0.0

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
2   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 30 2015 : 15:31:25
Hi

Another way to do the preceding would be to make use of the ImageTag or ImageUserPointer properties.

http://www.imageen.com/help/TImageEnMView.ImageTag.html
http://www.imageen.com/help/TImageEnMView.ImageUserPointer.html

To point to an entry in TList, Database, etc.

If you only need to store one color then simply use ImageTag as a color:


Appending:

  idx := AppendImage( SomeFile );
  If ShouldHighlightThumb( SomeFile ) then
    ImageEnMView1.ImageTag[ idx ] := Integer( clYellow )
  else
    ImageEnMView1.ImageTag[ idx ] := Integer( clWindowText );


Setting color:
procedure TForm1.IEFolderMViewGetTextEx(Sender: TObject; Index: Integer; Position: TIEMTextPos; var Text: WideString;
                                        Font : TFont; var BackgroundStyle: TBrushStyle; var BackgroundColor: TColor;
                                        var TruncSide: TIEMTruncSide);
begin
  BackgroundColor := TColor( ImageEnMView1.ImageTag[ Index] );
end;




Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
xequte Posted - Apr 06 2015 : 03:14:03
Hi

If you need to customize the styling of individual cells see the examples at:

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

Old code:
ImageEnMView1.ImageTopText[ n ].Background := clYellow;


New code:
procedure TForm1.IEFolderMViewGetTextEx(Sender: TObject; Index: Integer; Position: TIEMTextPos; var Text: WideString;
                                        Font : TFont; var BackgroundStyle: TBrushStyle; var BackgroundColor: TColor;
                                        var TruncSide: TIEMTruncSide);
begin
  If ShouldHighlightThumb( Index ) then
    BackgroundColor := clYellow;
end;




Nigel
Xequte Software
www.xequte.com
nigel@xequte.com