Question
How to Assign a control as the First Control to Recieve Focus after the Dialog Box is Displayed
Answer
The first way is to use the Z / Tab order window of the editor and force the control to the front. This will cause it to gain focus first.
There will be times when you may wish alter which control will recieve focus first when a dialog box is called. To do this do not use the Odcl_Control_SetFocus from the OnInitialize event, use Odcl_Control_ZOrder with a value of 1 from it instead.
(defun c:DclForm1_OnInitialize () ; calling ZOrder with a value of 1 to force the control to the top of the Tab/Zorder list will give this control the focus first. (Odcl_Control_ZOrder Test_DclForm1_Add 1) )
Knowledge Base
FAQ