Results 1 to 10 of 10

Thread: [RESOLVED] [2005] Event Procedure order for ComboBoxes?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Resolved [RESOLVED] [2005] Event Procedure order for ComboBoxes?

    I am really not sure what event procedures to use for a ComboBox control pertaining to a particular application. Here is my scenario.

    First off, both ComboBoxes have the "Droppeddown" property set to true when the control receives focus. The 2nd ComboBox is populated based on the value from the 1st ComboBox.

    Next, which events should be fired:

    1. When a user uses a mouse to select data from the list?
    2. When a user uses the up/down arrow to select data from the list?


    Thanks,
    Blake

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,422

    Re: [2005] Event Procedure order for ComboBoxes?

    selectedindex_changed

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: [2005] Event Procedure order for ComboBoxes?

    By using this event, it doesn't allow me to scroll down thru the items using the arrow keys. As soon as I pick the first different value, the procedure fires. I need to be able to scroll thru the items and press the enter key or tab key to make the selection.
    Blake

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] Event Procedure order for ComboBoxes?

    blake I told you in your original thread you made about this you should be using listboxes and not combooxes, as they just don't have this functionality.

    Is there a reason you can't use listboxes for this instead?

  5. #5
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] Event Procedure order for ComboBoxes?

    The closest you can probably get to the functionality you want, is to use the DropDownClosed event of the combobox which fires when the dropdown portion closes.

    Keep in mind though you won't want any code in this event that will take focus away from your control and bring it back (like a messagebox) otherwise you will get a weird UI loop.

  6. #6

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: [2005] Event Procedure order for ComboBoxes?

    The listbox takes up too much space. Aesthetically, it doesn't look right. Can you set listbox properties to be like combobox properties?
    Blake

  7. #7
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] Event Procedure order for ComboBoxes?

    some of them yes, but you would need to be specific about the properties.

    Did you look at the dropdownclosed event of the combobox?

  8. #8

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: [2005] Event Procedure order for ComboBoxes?

    Yes, I looked at it but it would require alot of logic changes.
    Blake

  9. #9
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2005] Event Procedure order for ComboBoxes?

    I think the only way you will the exact functionality you want, is going to be to inherit the combobox to a new control, and override wndproc to look for specific windows messages, and raise custom events on these messages.

  10. #10

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: [2005] Event Procedure order for ComboBoxes?

    Looks like I'm gonna have to just improvise because what your talkin' about....I have no clue on how to do.
    Blake

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width