I am using a thumbnailviewer and I've been trying to figure out how to keep the next selected thumbnail active after you remove a selected thumbnail.
For example I click to select a thumbnail (my highlight box is colored red), I then have a button event that removes the selected thumbnail from the viewer, but then I have to click again to select the next thumbnail to perform the delete again. Is there a way to keep that selection persistent so that I could keep clicking the delete button without having to click the next thumbnail?
Here is a snippet of C# code I am currently using:
Code: Select all
var images = tvRight.GetSelectedImages();
if (images.Length == 0)
return;
for (var count = 0; count < images.Length; count++)
{
tvRight.Images.Remove(images[count]);
}
tvRight.Focus();
tvRight.FocusedIndex = 0;
Let me know if you need more information.
Thank You.
Jamie C.