Thumbnail Viewer: FocusedIndex and SelectedIndex

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
SebastianB
Posts: 20
Joined: Thu Sep 27, 2012 12:39 pm

Thumbnail Viewer: FocusedIndex and SelectedIndex

Post by SebastianB »

Imagine of have a ThumbnailViewer and an ImageViewer. imageViewer1 is set a MasterViewer of ThumbnailViewer.

If you click on a ThumbnailImage the ImageViewer displays the correct image. If you change the FocusedIndex both, ThumbnailViewer and ImageViewer change the FocusedIndex, so far so good.

But what does not change is the selected index, which confused the user: With default settings the FocusedImage is highlighted with a dotted rectangle in ThumbnailViewer, the selectedImage is highlighted with the blue gradient box. When clicking on a thumbnail image the selectedImage and the focusedImage are the same, but when changing the focusedIndex programmatically there are two highlighted images in the thumbnail viewer: the focused one and the selected one.
Due to I do not like the dotted line I set the appearance of focusedImage and selectedImage to the same settings (refer screenshot below)

How to change the selectedImage when focusedIndex changed?

The first image was selected by clicking, the second one by changing the focusedIndex using the navigation tools.
Image
Yuri
Posts: 64
Joined: Wed Jul 23, 2008 2:47 pm

Re: Thumbnail Viewer: FocusedIndex and SelectedIndex

Post by Yuri »

Hello,


You have to change the selected thumbnails collection: thumbnailViewer.SelectedIndicies.

After you changed FocusedIndex property programmatically you should clear the collection of SelectedIndicies and add to it FocusedIndex.


Sincerely, Yuri
SebastianB
Posts: 20
Joined: Thu Sep 27, 2012 12:39 pm

Re: Thumbnail Viewer: FocusedIndex and SelectedIndex

Post by SebastianB »

That's it! Thanks, Yuri! :D
Post Reply