yunjingtao schrieb: > hi, Daniel > the code below is based on DEV300_M20. I made some changes like this : > ScScenarioWindow::ScScenarioWindow( Window* pParent,const String& aQH_List, > const String& aQH_Comment) > : Window ( pParent , WB_DIALOGCONTROL | WB_TABSTOP ), > aLbScenario ( this ), > aEdComment ( this, WB_BORDER | WB_LEFT > | WB_READONLY | WB_VSCROLL ) > > > ScScenarioListBox::ScScenarioListBox( Window* pParent ) > : ListBox ( pParent, WB_BORDER | WB_TABSTOP | WB_DIALOGCONTROL ), > rParent ( (ScScenarioWindow&)*pParent ), > pAccel ( NULL ) > > the current situation is that the MultiLineEdit can capure the TAB key > but the ScScenarioListBox can't do that. It's strange. How can TAB key jump > into the ScScenarioListBox? can you help me?
The aEdComment gets the focus though you do not pass WB_TABSTOP to its c'tor? Please have a look at ScScenarioListBox::GetFocus and ScScenarioListBox::LoseFocus, these virtual functions have been overwritten, and the respective functions of the base class ListBox are not called. This prevents the ListBox to react on the focus events. You do not need to set WB_DIALOGCONTROL in ScScenarioListBox, this flag is only for controls that contain children (such as ScScenarioWindow). WB_TABSTOP is enough. Did you notice that the "tab order" in the navigator is wrong? When you press TAB, the document listbox at the bottom gets the focus before the scenario window. The focus should move from top to bottom, and not to jump down then up. This is caused by a wrong member order in the ScNavigatorDlg class (aWndScenarios follows aLbDocuments). Please try to fix this too :-) Hope this helps Daniel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
