Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
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: