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
 Scroll to the selected image?

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 - Sep 23 2020 : 14:12:30
I select an image programmatically in a TImageEnMView (previously filled with AddShapesToImageEnMView) with:

ImageEnMView1.SelectImage(i);


How can I then scroll to the selected image?

I have searched in the documentation but have not found this functionality.
2   L A T E S T    R E P L I E S    (Newest First)
PeterPanino Posted - Sep 23 2020 : 17:50:50
Hi Nigel,

thank you for the information.

Now, SelectedImage does scroll to the selected image. But it scrolls only to the first row with the selected image.

So I additionally call CenterSelected which centers the selected image in the client area.

Amazing!
xequte Posted - Sep 23 2020 : 17:48:24
Hi Peter

Calling SelectImage only marks the image as selected, it is not the correct method to make it as current (and selected). For that, set SelectedImage (sorry, for historical reasons, that is a bit confusing).

When setting SelectedImage it will bring it into view if SelectedImageAlwaysVisible = True.

Note: You can call the following at any time to scroll the view to the current image:

ImageEnMView1.SelectedImageAlwaysVisible := True;

Nigel
Xequte Software
www.imageen.com