zComboBoxFull on tab stop on zNoteBkDialog prevents tab from reaching any farther

Article ID: 859
Last updated: 05 Feb, 2008
Article ID: 859
Last updated: 05 Feb, 2008
Revision: 1
Views: 2786
Posted: 02 Sep, 1997
by Dean J.
Updated: 05 Feb, 2008
by Dean J.
Problem


If you have a zNotebook dialog with a zComboBoxFull, when the tab stop gets to the combo box, further tab presses do not work.


Cause


There is a small coding error which doesn't pass on tab stops to controls beyond a zComboBoxFull.


Action


Implement the tcombbox.txt.

Now make the following changes to the tComboBox.

// override the ch() member of the tComboBox and pass the tab along.
// If there is an inline version of the ch() member in the .hpp for
the tcomboBox
// remove it and use this one.

int tComboBox::ch(zKeyEvt *ev){

   if( ev->ch() == VK_TAB ){
      PostMessage(*(parent()->parent()),WM_CHAR,VK_TAB,0L);
      return 1;
   }

   return 0;
}

*****

After all the above changes are inserted, now use the tComboBox where you are using the zComboBoxFull.

Example:

DNotebk1Page1::DNotebk1Page1(zNotebookDialog *w, zPageDef *pd) : zDialogPage(w,
pd)
 // zpb_begin Notebk1Page1InitList
 // zpb_end
{
 pEdit1 = new zEditLine(this, ID_EDIT1, &_Edit1, 0);
---->>> pComboBox1 = new tComboBox(this, 1077, &_ComboBox1);
 pButton1 = new zPushButton(this, ID_BUTTON1);
 pButton1->setNotifyClicked(this, (NotifyProc)(NotifyEvtProc)&DNotebk1Page1::clickedButton1);
---->>> pComboBox2 = new tComboBox(this, ID_COMBOBOX2, &_ComboBox2);
 pEdit2 = new zEditLine(this, ID_EDIT2, &_Edit2, 0);
 pEdit3 = new zEditLine(this, ID_EDIT3, &_Edit3, 0);
 pButton2 = new zPushButton(this, ID_BUTTON2);
 pButton2->setNotifyClicked(this, (NotifyProc)(NotifyEvtProc)&DNotebk1Page1::clickedButton2);

 // zpb_begin pgNotebk1Page1Constructor1
 // zpb_end
}

This article was:   Helpful | Not helpful
Report an issue
Article ID: 859
Last updated: 05 Feb, 2008
Revision: 1
Views: 2786
Posted: 02 Sep, 1997 by Dean J.
Updated: 05 Feb, 2008 by Dean J.

Others in this category