Click to See Complete Forum and Search --> : ListBox Sorted Property


slpc01
February 24th, 2000, 02:45 AM
Hi,
I use VB6 to create a form, which contains a listbox and another command button.
I try to use the button to change the Sorted Property of the listbox in runtime (List1.Sorted = True/False)
But when I click the button, it said "cannot change read only property"
Is that sorted property can't be changed in runtime??

Cakkie
February 24th, 2000, 02:53 AM
The sort property of a listbox can only be set at design time. You will need to write your own procedure to sort the listbox.

Tom Cannaerts
slisse@planetinternet.be

The best way to escape a problem, is to solve it.

Lothar Haensler
February 24th, 2000, 02:53 AM
correct, the Sorted property can only be set at design-time.
The listView control allows you to change the sorting order and so on at runtime.