09-04-2008, 2:59
|
Maen Hasan

Joined on 08-05-2004
Posts 1,880
|
Re: Context menu on thumbnail item of the RasterThumbnailBrowser
|
 
 
|
|
|
This is the default behavior. If you want to show the context menu for multiple thumbnail items, you need to hold the Ctrl Key with the right mouse button.
But if you want to show the context menu without holding the Ctrl key, you may try to do this as follows: - Before clicking the right mouse button to show the context menu, save the selected items in a RasterImageListItemCollection class. - Click the right mouse button to show the context menu. - Reselect the items in the RasterImageListItemCollection class as follows: +-------+ private void theBrowser_MouseDown(object sender, MouseEventArgs e) { switch (e.Button) { case MouseButtons.Left: break; case MouseButtons.Right: contextMenuStrip1.Show(MousePosition.X, MousePosition.Y); for (int i = 0; i < SelItems.Count; i++) { theBrowser.SelectedItems.Add(SelItems[i]); theBrowser.SelectedItems[i].Selected = true; } break; case MouseButtons.Middle: break; default: break; } }
private void theBrowser_SelectedIndexChanged(object sender, EventArgs e) { SelItemsCollection = theBrowser.SelectedItems; } +-------+
I didn't try the above code, so please try it and let me know how it goes.
Thanks, Maen Badwan LEADTOOLS Technical Support
|
|
|
|
|
Report
|
|
|
|