OpenDCL Forums

OpenDCL => Studio/Dialog Editor => Topic started by: Jim Short on August 25, 2009, 08:36:15 AM

Title: dcl_ListBox_SetCurSel
Post by: Jim Short on August 25, 2009, 08:36:15 AM
Modal Form with a list box and grid.

OnInitialize dcl_ListBox_SetCurSel selects the first item in the list at load time.
When the user selects a different item in the list box, OnSelChanged event to fills grid with associated data.

I thought there was a time past when playing with tree control that programmatically selecting a node behaved the same way as physically selecting it.
I see that this is not occurring that way now. Has this changed behavior?

Can the OnSelChanged event be explicitly called by lisp in OnInitialize to fill the grid? Does synchronous or modal issues enter into how this works?

I would like to reuse the grid filling code rather than write it into the OnSelChanged event just to display the first selections data.

Jim

Title: Re: dcl_ListBox_SetCurSel
Post by: owenwengerd on August 25, 2009, 09:21:53 AM
As long as your OnSelChanged doesn't require the grid to be visible, you can just call it from your OnInitialized handler.