In OnInitialize set ListBox Control_SetSorted T or nil then launch modal from.
The first time form launches a change of property does not take effect.
The second time form launches sort property reflects change.
Jim
Setting Sorted to true has no effect on items already in the list at that point. During OnInitialize, the items in the List property are already in the list. Of course, the next time the list box is created, Sorted will be true during creation, so the List items will be sorted as they are inserted during listbox creation.
Thanks Owen, that helps.
I think you are saying that the SetSorted property must be set to true prior to form show (creation time) for the list box to sort. Changing the sort property is not possible while a modal form is displayed unless in response to an event, and in that case, the change is not reflected until the form is recreated.
Is this behavior typical for other properties that typically are set at design time?
It's not that you can't set Sort at runtime, it's just that changing the property does not affect existing list items -- it only affects items that are subsequently added.