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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. No Double click event on a list box control - C#.Net(Copmact framework)

No Double click event on a list box control - C#.Net(Copmact framework)

Scheduled Pinned Locked Moved C#
csharphelptutorial
5 Posts 3 Posters 1 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.
  • S Offline
    S Offline
    Sri harini
    wrote on last edited by
    #1

    Hi, I am developing windows mobile application using C#.Net(Compact frame work).I can not find double click event on list box control..Please advice how to add the event... please anybody help me... Thanks&Regards

    D D 2 Replies Last reply
    0
    • S Sri harini

      Hi, I am developing windows mobile application using C#.Net(Compact frame work).I can not find double click event on list box control..Please advice how to add the event... please anybody help me... Thanks&Regards

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      That's because there isn't one. Why would you want one anyway? It's not a standard, or expected, behavior for the control.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      D 1 Reply Last reply
      0
      • D Dave Kreskowiak

        That's because there isn't one. Why would you want one anyway? It's not a standard, or expected, behavior for the control.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        D Offline
        D Offline
        Dan Neely
        wrote on last edited by
        #3

        I can't speak for the OP, but in one of my apps I have a popup form with a listbox to select a value. A double click is implemented to do the same functionality as a single click on the item, and a click of the OK button.

        -- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer

        1 Reply Last reply
        0
        • S Sri harini

          Hi, I am developing windows mobile application using C#.Net(Compact frame work).I can not find double click event on list box control..Please advice how to add the event... please anybody help me... Thanks&Regards

          D Offline
          D Offline
          Dan Neely
          wrote on last edited by
          #4

          Log the time of a click in the single click event, and if currentClickTime - LastClickTime < delta use double click behavior instead of single click.

          -- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer

          D 1 Reply Last reply
          0
          • D Dan Neely

            Log the time of a click in the single click event, and if currentClickTime - LastClickTime < delta use double click behavior instead of single click.

            -- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            I haven't tried it, but it seems like you could create your own version of the control and override the OnDoubleClick method and actually raise the event instead of doing nothing.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            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