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
 How to automatically add a standard bottom text?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

933 Posts

Posted - Dec 25 2016 :  14:40:37  Show Profile  Reply
When filling a TImageEnMView, for each thumbnail I need to show a standard bottom text with the index number, e.g.: Image 1, Image 2, ...

How can this most efficiently be done? I've tried this, but it does not work at all (no thumbnail bottom text is shown):

procedure TForm2.ImageEnMView1ImageAdded(Sender: TObject; idx: Integer);
begin
  ImageEnMView1.ImageBottomText[idx] := 'Page ' + IntToStr(idx);
end;

PeterPanino

933 Posts

Posted - Dec 25 2016 :  14:50:32  Show Profile  Reply
When I use this code:

procedure TForm2.ImageEnMView1GetText(Sender: TObject; Index: Integer;
    Position: TIEMTextPos; var Text: WideString);
begin
  Text := 'Page ' + IntToStr(Index);
  Position := iemtpBottom;
end;


... then not only the bottom text is added but also TWO other texts at the top of the thumbnails! Why? I have specified Position := iemtpBottom;
Go to Top of Page

PeterPanino

933 Posts

Posted - Dec 25 2016 :  15:02:36  Show Profile  Reply
I am sorry, this is how it works:

procedure TForm2.ImageEnMView1GetText(Sender: TObject; Index: Integer;
    Position: TIEMTextPos; var Text: WideString);
begin
  if Position = iemtpBottom then
    Text := 'Page ' + IntToStr(Index + 1);
end;
Go to Top of Page

xequte

38610 Posts

Posted - Dec 26 2016 :  02:15:55  Show Profile  Reply
Hi

What is your value for DefaultTopText?

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

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

PeterPanino

933 Posts

Posted - Dec 26 2016 :  07:21:05  Show Profile  Reply
Thank Nigel, but I have solved it with:

if Position = iemtpBottom then
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: