Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, September 30, 2010 12:40:10 AM(UTC)


Groups: Registered
Posts: 21

Hello.. I am doing the project in c#(windows applicatio) with leadtool16.. and using RasterImageList control in my application...actually, i wana select item with mouse right button click in the item of control. and i want to work double click event only with item double click..pls help me fast...

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, September 30, 2010 6:09:44 AM(UTC)

Adam Boulad  

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

If you mean you want to the right-click mouse click to select the item, you can use this code. If you mean something else, please let me know.
private void imageList1_MouseClick(object sender, MouseEventArgs e)
  // Check for right button clicks
  if (e.Button == MouseButtons.Right)
    // Check if any item is under the cursor poisition
    RasterImageList imageList = sender as RasterImageList;
    RasterImageListItem item = imageList.HitTest(e.X, e.Y);
    if (item != null)
      for (int i = 0; i < imageList1.Items.Count; i++)
        if (item == imageList1.Items[i])
        imageList1.Items[i].Selected = true;

You can also use the same HitTest method with double click event to test if you're getting it while the mouse cursor is inside an item or not.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.057 seconds.