Modal ListBox Control_SetSorted

Started by Jim Short, April 17, 2009, 06:17:06 PM

Previous topic - Next topic

Jim Short

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
Jim Short

owenwengerd

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.
Owen Wengerd (Outside The Box) / ManuSoft

Jim Short

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?
Jim Short

owenwengerd

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.
Owen Wengerd (Outside The Box) / ManuSoft