Thank you for your question.
As the control offers multi selection, it is required to loop through all the elements to test whether they are selected or not. The GetItemSelectState method is designed to this purpose.
The method is described within the standard documentation:
http://guides.gdpicture.com/content/GdP ... State.html
Thanks for the reply, I tried your approach but still no luck. I have this code below for testing purposes, I placed it on the click event and set the index on my global variable.
private void Thumbnail_Click(object sender, EventArgs e)
for (int i = 0; i < Thumbnail.ItemCount - 1; i++)
Globals.thumbnailIndex = i;
MessageBox.Show("Index is: " + Globals.thumbnailIndex, "TEST", MessageBoxButtons.OK, MessageBoxIcon.Information);
I loaded a pdf document containing 3 pages, but when when I clicked the pages one by one starting from page 1 to 3, the indexes are 0,1,1 respectively. Its supposed to be 0,1,2 right? what am i missing?
You need to catch the ItemClicked event, it provides two arguments: one is the thumbnail index that has been clicked and the other one is the mouse button that has been used in case you want to do something different whether the right or left mouse button has been used.
Who is online
Users browsing this forum: Baidu [Spider] and 1 guest