Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. double click on a ListViewItem

double click on a ListViewItem

Scheduled Pinned Locked Moved C#
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amit_83
    wrote on last edited by
    #1

    Hi all, When I double click on a ListViewItem, I don't want the checked property of the item to change. By default, this does happen and I can't see a way of disabling this behaviour. Thanks in advance.

    amit

    D M 2 Replies Last reply
    0
    • A amit_83

      Hi all, When I double click on a ListViewItem, I don't want the checked property of the item to change. By default, this does happen and I can't see a way of disabling this behaviour. Thanks in advance.

      amit

      D Offline
      D Offline
      DaveyM69
      wrote on last edited by
      #2

      I don't think you can. The events occur in this order: ItemCheck ItemChecked DoubleClick MouseDoubleClick so it's not possible to tell whether the change is occurring because of the double click until after the check has been changed.

      Dave

      1 Reply Last reply
      0
      • A amit_83

        Hi all, When I double click on a ListViewItem, I don't want the checked property of the item to change. By default, this does happen and I can't see a way of disabling this behaviour. Thanks in advance.

        amit

        M Offline
        M Offline
        mav northwind
        wrote on last edited by
        #3

        Hi! Trying to set the checked property in the CheckedChanged event doesn't work directly, but with a litte trick you can achieve this: Call a delegate for resetting the Checked state using BeginInvoke(), so that the code is executed after the CheckedChanged event handler is through.

        Regards, mav -- Black holes are the places where God divided by 0...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups