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. Visual Basic
  4. Combo Box Improvement

Combo Box Improvement

Scheduled Pinned Locked Moved Visual Basic
helpquestion
3 Posts 2 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
    Asim N
    wrote on last edited by
    #1

    Hello, I have a little problem, i am expecting a solution. I have a combobox loaded with data. I have to do some operations once the New item is selected. But i don't want to use selectedindex/value changed event, as this will change on any selection. Instead i want to perform the operation once the item is selected i.e. once the change is committed. The event is SelectionChangeCommitted. The problem with SelectionChangeCommitted is that this never fires in different cases like COmboBox is in drop mode and we are using keyboard arrow keys to select different items. Now when we click anywhere on the form the value is changed but this event is not fired! There are other cases like you are going through values in drop mode and then you press escape button. New Value is selected but again SelectionChangeCommitted is not fired. So Can anyone tell me the work around ? Waiting anxiously for some solution. Regards, Asim

    S 1 Reply Last reply
    0
    • A Asim N

      Hello, I have a little problem, i am expecting a solution. I have a combobox loaded with data. I have to do some operations once the New item is selected. But i don't want to use selectedindex/value changed event, as this will change on any selection. Instead i want to perform the operation once the item is selected i.e. once the change is committed. The event is SelectionChangeCommitted. The problem with SelectionChangeCommitted is that this never fires in different cases like COmboBox is in drop mode and we are using keyboard arrow keys to select different items. Now when we click anywhere on the form the value is changed but this event is not fired! There are other cases like you are going through values in drop mode and then you press escape button. New Value is selected but again SelectionChangeCommitted is not fired. So Can anyone tell me the work around ? Waiting anxiously for some solution. Regards, Asim

      S Offline
      S Offline
      shoaibnawaz
      wrote on last edited by
      #2

      Each firing event execute a subrutine in Visual Basic. In some cases when one event is firring and not the other which you want, You can fire it manualy by calling the subrutine that executes against that event which is to fired. If user selects with arrow keys. KeyUp event can be used to fire Click Event Sub MyCombo1_KeyUp(KeyCode as Integer, Shift as Integer) If KeyCode = 38 or KeyCode = 40 then Call MyCombo1_Click End If End Sub When user will press Up or Down keys, Click Event Functionality will also work. This is only the demonstration, you can manage it your self. Shoaib Nawaz

      A 1 Reply Last reply
      0
      • S shoaibnawaz

        Each firing event execute a subrutine in Visual Basic. In some cases when one event is firring and not the other which you want, You can fire it manualy by calling the subrutine that executes against that event which is to fired. If user selects with arrow keys. KeyUp event can be used to fire Click Event Sub MyCombo1_KeyUp(KeyCode as Integer, Shift as Integer) If KeyCode = 38 or KeyCode = 40 then Call MyCombo1_Click End If End Sub When user will press Up or Down keys, Click Event Functionality will also work. This is only the demonstration, you can manage it your self. Shoaib Nawaz

        A Offline
        A Offline
        Asim N
        wrote on last edited by
        #3

        Thank you Shoaib. THis helped me a lot in resolving the problem. Regards, Asim

        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