Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Update for tabbed toolbar takes too long and seems to do too much Collapse All
Subject Author Date
Malcolm D Apr 15, 2008 - 10:40 PM

The UI updated for the tabbed toolbar seems to take a long time. I noticed in the code that it does the update for item in every toolbar that is part of the tabbed toolbar. i.e. it does the update for items which are not visible.


Can this be changed so the update is only done for visible items.


Thanks

Technical Support Apr 17, 2008 - 6:38 AM

Thank you very much for reporting this issue. You can fix this by updating the source code for the CExtTabbedToolControlBar::OnUpdateCmdUI() method:

void CExtTabbedToolControlBar::OnUpdateCmdUI(
      CFrameWnd * pTarget,
      BOOL bDisableIfNoHndler
      )
{
CExtTabPageContainerWnd * pWndTabPageContainer = GetTabPageContainer();
      if( pWndTabPageContainer == NULL )
            return;
LONG nSel = pWndTabPageContainer->PageSelectionGet();
      if( nSel <= 0 )
            return;
CExtToolControlBar * pToolBar = BarGetAt( nSel );
      ASSERT_VALID( pToolBar );
INT nBtnIdx, nCountOfButtons = pToolBar->GetButtonsCount();
      for( nBtnIdx = 0; nBtnIdx < nCountOfButtons; nBtnIdx++ )
      {
            CExtBarButton * pTBB =
                  pToolBar->GetButton( nBtnIdx );
            ASSERT_VALID( pTBB );
            pTBB->OnUpdateCmdUI( pTarget, bDisableIfNoHndler, nBtnIdx );
      }
      pToolBar->UpdateDialogControls( pTarget, bDisableIfNoHndler );
}