OpenDCL Forums

OpenDCL => Studio/Dialog Editor => Topic started by: Jim Short on April 17, 2009, 06:17:06 PM

Title: Modal ListBox Control_SetSorted
Post by: Jim Short on April 17, 2009, 06:17:06 PM
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
Title: Re: Modal ListBox Control_SetSorted
Post by: owenwengerd on April 17, 2009, 07:08:09 PM
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.
Title: Re: Modal ListBox Control_SetSorted
Post by: Jim Short on April 18, 2009, 07:13:56 AM
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?
Title: Re: Modal ListBox Control_SetSorted
Post by: owenwengerd on April 18, 2009, 01:24:55 PM
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.