Form items - tab index

Started by svranic, December 30, 2010, 06:08:51 AM

Previous topic - Next topic

svranic

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)
)

svranic

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)
)

owenwengerd

You should set your tab order in OpenDCL Studio at design time.

svranic

Yes, thanks. I figured out now how to do it. What a dumb mistake.