OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: svranic on December 30, 2010, 06:08:51 AM

Title: Form items - tab index
Post by: svranic on December 30, 2010, 06:08:51 AM
Hi all,
I'm doing a simple form with few textboxes and few buttons. By pressing Tab on my keyboard focus is set from one form item to another. The problem is that it doesn't go in order, from top to bottom. Is there a way to accomplish this (in AutoLISP or OpenDCL)?
I managed to set initial focus on the first form item:
Code (autolisp) Select

(defun c:project1_frmForm1_OnInitialize (/)
    ;; sets initial focus on the first form item
    (dcl_Control_ZOrder project1_frmForm1_txtTextBox1 1)
)
Title: Re: Form items - tab index
Post by: svranic on December 30, 2010, 06:52:38 AM
It's all OK. I solved the problem myself. I solved the problem by puting control on top of Z/Tab order. Here is the code:
Code (autolisp) Select

(defun c:project1_frmForm1_OnInitialize (/)
    (dcl_Control_ZOrder project1_frmForm1_txtTextBox4 1)
    (dcl_Control_ZOrder project1_frmForm1_txtTextBox3 1)
    (dcl_Control_ZOrder project1_frmForm1_txtTextBox2 1)
    (dcl_Control_ZOrder project1_frmForm1_txtTextBox1 1)
)
Title: Re: Form items - tab index
Post by: owenwengerd on December 30, 2010, 08:29:12 AM
You should set your tab order in OpenDCL Studio at design time.
Title: Re: Form items - tab index
Post by: svranic on December 30, 2010, 11:19:12 PM
Yes, thanks. I figured out now how to do it. What a dumb mistake.