How to Set Tab order for dynamically created controls like CButton,CEdit
-
Hello all, I created a window. Over that window i created some controls of the class CButton, CEdit,CStatic, CComboBox. My problem is that, i have to assign the tab order for this controls. I set the WS_TABSTOP property while creating this controls. But tab order is not set for this controls. How can i set tab order for this controls. ******************** CEdit* pedtName = new CEdit(); pedtName->Create(ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP,CRect(160,140,300,170) ,this,EDITNAME);
-
Hello all, I created a window. Over that window i created some controls of the class CButton, CEdit,CStatic, CComboBox. My problem is that, i have to assign the tab order for this controls. I set the WS_TABSTOP property while creating this controls. But tab order is not set for this controls. How can i set tab order for this controls. ******************** CEdit* pedtName = new CEdit(); pedtName->Create(ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP,CRect(160,140,300,170) ,this,EDITNAME);
-
Hello all, I created a window. Over that window i created some controls of the class CButton, CEdit,CStatic, CComboBox. My problem is that, i have to assign the tab order for this controls. I set the WS_TABSTOP property while creating this controls. But tab order is not set for this controls. How can i set tab order for this controls. ******************** CEdit* pedtName = new CEdit(); pedtName->Create(ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP,CRect(160,140,300,170) ,this,EDITNAME);
-
Sorry sir, it doesn't work. I created two edit control as follows on the OnCreate() method of the application. ************** CEdit* pedtName = new CEdit(); pedtName->Create(ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER,CRect(160,100,300,130) ,this,EDITNAME); pedtName->SetFont(pFont,TRUE); CEdit* pedtSurName = new CEdit(); pedtSurName->Create(ES_AUTOVSCROLL | ES_AUTOHSCROLL |ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER,CRect(160,140,300,170) ,this,EDITSURNAME); ***************** When i run the application, focus will automatically set to pedtName control. When i press tab key, tab focus will set on pedtSurName. But now it doesn't work. How to do this?
-
Hello all, I created a window. Over that window i created some controls of the class CButton, CEdit,CStatic, CComboBox. My problem is that, i have to assign the tab order for this controls. I set the WS_TABSTOP property while creating this controls. But tab order is not set for this controls. How can i set tab order for this controls. ******************** CEdit* pedtName = new CEdit(); pedtName->Create(ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP,CRect(160,140,300,170) ,this,EDITNAME);
Why don't you simply create the controls in the order that you want.
«_Superman_»
-
Hello all, I created a window. Over that window i created some controls of the class CButton, CEdit,CStatic, CComboBox. My problem is that, i have to assign the tab order for this controls. I set the WS_TABSTOP property while creating this controls. But tab order is not set for this controls. How can i set tab order for this controls. ******************** CEdit* pedtName = new CEdit(); pedtName->Create(ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP,CRect(160,140,300,170) ,this,EDITNAME);
If you want to set Tab Order on the dialog forum you must be press Ctrl+D or runtime liek this: CWnd *m_pWnd1 = GetDlgItem (IDC_BUTTON1); CWnd *m_pWnd2 = GetDlgItem (IDC_EDIT2); m_pWnd1->SetWindowPos (m_pWnd2, 0,0,0,0, SWP_NOMOVE | SWPNOSIZE);
Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )