-
February 1st, 2013, 04:10 PM
#1
How to sort a combobox after it has been created ?
I have a combobox which doesn't have the CBS_SORT style and after adding some items I'd like to offer the ability for the user to sort it alphabetically by clicking on a given button.
How can I sort the combobx after it has been created and some items added to it ?
-
February 1st, 2013, 04:30 PM
#2
Re: How to sort a combobox after it has been created ?
You have to destroy (or hide) this combox and create (or show) another one with the CBS_SORT style and then populate this new one with the same item list.
Victor Nijegorodov
-
February 2nd, 2013, 04:34 AM
#3
Re: How to sort a combobox after it has been created ?
-
February 4th, 2013, 09:30 AM
#4
Re: How to sort a combobox after it has been created ?
or
get the contents of the combobox into an array
clear the combobox
sort the array
fill the combobox in sorted order from the array
-
February 4th, 2013, 10:45 AM
#5
Re: How to sort a combobox after it has been created ?
Why not just create it initially with the CBS_SORT style?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|