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
 BottomText when appending Bitmap to TImageEnMView?

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
PeterPanino Posted - Jan 19 2021 : 15:36:43
In a TImageEnMView I add images with:

ImageEnMView1.AppendImage(ABitmap);


I need to add a different BottomText to each image. This BottomText is available only when using AppendImage. It is NOT available in the TImageEnMView.OnGetText event-handler.

So, is there a way to add BottomText when adding the images with ImageEnMView1.AppendImage(ABitmap)?

Reading the documentation, unfortunately there is no such an overload:

ImageEnMView1.AppendImage(ABitmap, ABottomText);
3   L A T E S T    R E P L I E S    (Newest First)
PeterPanino Posted - Jan 21 2021 : 17:51:57
Hi Nigel,

as always, your solutions are BRILLIANT! Thanks!
xequte Posted - Jan 20 2021 : 22:23:39
Hi Peter

You can use:

idx := ImageEnMView1.AppendImage( 'D:\Butterfly.jpg' );
ImageEnMView1.ImageTopText[idx]    := 'Top text';
ImageEnMView1.ImageInfoText[idx]   := 'Info text';
ImageEnMView1.ImageBottomText[idx] := 'Bottom text';


Also, for bottom text you should use iemtpBottom in the OnGetText event.

Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Jan 20 2021 : 06:10:54
I have solved the problem by adding the Bottom Text to a StringList when appending the Bitmaps and then adding the Bottom Text from that StringList in the OnGetText event-handler:

procedure TformCustomClipartsListsManager.ImageEnMViewSVGCollectionGetText(Sender: TObject; Index: Integer; Position: TIEMTextPos; var Text: WideString);
begin
  if Position = iemtpInfo then
    Text := SLBottomText[Index];
end;


But this adds unnecessary complexity to the implementation and thus is error-prone. So I suggest you implement this additional overload:

function TImageEnMView.AppendImage(Bitmap : TBitmap; ATopText, AInfoText, ABottomText: string): integer;