• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

Move Item To Top Of ComboBox

I am working with a combobox that is sorted.  I want to add an item after the sorted items are entered that will be at the top of the combobox... like NONE.

I don't want to use a space or an underscore to move it to the top... anyway to do this???

Thanks!
0
MTroutwine
Asked:
MTroutwine
  • 3
  • 2
  • 2
  • +3
1 Solution
 
Anthony PerkinsCommented:
No.  The only other way would be for you to maintain the sorted items and leave the Sort property = False.

Anthony
0
 
TimCotteeCommented:
Indeed, sort the items first and then add them to the combo box is the only way of doing this.
0
 
deightonCommented:
'with.sorted is true
   
    Combo1.AddItem "Bunk"
    Combo1.AddItem "Abunk"
    Combo1.AddItem "NONE", 0
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
deightonCommented:
note that your combo has .sorted=true in properties.
0
 
Anthony PerkinsCommented:
deighton,

You are right.  I overlooked that solution.

Anthony
0
 
Richie_SimonettiIT OperationsCommented:
i am late!
0
 
deightonCommented:
..so did I, it was an accident, I was trying to change sorted to .false then add it to the top - you can't change to .false, but adding it to the top still seems to work.
0
 
rspahitzCommented:
Alternately you can do what Microsoft did ni its properties listing (with name, custom, etc.) and surround it with parentheses:  "(None)"

This will also reinforce the idea that this is not part of the dataset.
0
 
MTroutwineAuthor Commented:
Sorry for the delay on this... I used your idea of "(None)".  Works fine now.
0
 
rspahitzCommented:
Glad you liked the idea (even if it came from Microsoft), and thanks for the "A" grade.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now