Results 1 to 3 of 3

Thread: Combo Box

  1. #1

    Thread Starter
    Addicted Member VB6Coder's Avatar
    Join Date
    Apr 2001
    Location
    Northampton, UK
    Posts
    185

    Question Combo Box

    I've got a combobox which is populated with the following items:

    - C:\Program Files\...\Test.Doc
    - C:\Program Files\...\Test2.Doc
    - C:\Program Files\...\Test3.Doc

    When the user selects an item from the drop down the full path is displayed in the textbox part of the combo box (The Combo Box Style property is set to 0)

    e.g.
    Select C:\Program Files\...\Test.Doc from the drop down and the combo box displays C:\Program Files\Microsoft Visual Studio\VB98\Test.Doc

    The problem is, when the user clicks the drop down button, none of the items are selected in the list because the text in the combo box no longer matches an item in the list.

    Can anyone think of a way I can have the full path displayed in the textbox part of the combo box, and have the shorten path selected in the drop down list when it is displayed

    The best idea I have come up with so far is to overlay a textbox control on top of the combobox control, but the textbox loses focus when the combobox is clicked.




  2. #2
    Megatron
    Guest
    You could store the ListIndex property when the item is selected.

  3. #3

    Thread Starter
    Addicted Member VB6Coder's Avatar
    Join Date
    Apr 2001
    Location
    Northampton, UK
    Posts
    185
    I'm not sure how that would help Megatron.

    The problem is, when the user clicks the drop down button, none of the items are selected in the list because the text in the combo box no longer matches an item in the list.

    Can anyone think of a way I can have the full path displayed in the textbox part of the combo box, and have the shorten path selected in the drop down list when it is displayed.

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