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 » CExtNCSB < CExtTreeCtrl > and CExtControlBar Collapse All
Subject Author Date
Lars Mohr Jan 11, 2009 - 3:17 PM

Hi Support-Team


 


I want to have a ControlBar with an ExtTreeCtrl inside. And it works well if create the tree without the CExtNCSB template class and with the template class it doesn’t work. But without this class I get the tree with standard scrollbar. Is there any possibility to get the ExtTreeCtrl with right theme scrollbar in a ExtControlBar?


 


 


 


Regards

Technical Support Jan 14, 2009 - 12:19 PM

Yes.

The CExtNCSB template class controls two CExtScrollBar windows created over other window with scroll bar like non-client areas.

The CExtNSB template class is designed for inserting CExtScrollBar scroll bars into any CExtScrollWnd-based window like CExtGridWnd, CExtTreeGridWnd, CExtReportGridWnd, CExtImageEditWnd and CExtColorPaletteWnd.


Offer Har Jan 14, 2009 - 4:18 PM

So what do I need to do in a control-bar that has a grid in it?

Technical Support Jan 15, 2009 - 1:26 PM

Just create the grid window inside the control bar. The grid can be based on the CExtNSB template class or not be based on it - in any case there are no need to invoke non-default constructors.

Technical Support Jan 12, 2009 - 12:22 PM

The CExtNCSB template class creates two CExtScrollBar windows in the same z-order layer with the CExtTreeCtrl window. As a result, the CExtControlBar window contains three child windows. But the CExtControlBar window is designed to be a container for one child window only. The CExtNCSB template class can also be configured for using <b>middle container mode</code>. In this mode it creates one container window between the tree and the control bar and creates two scroll bars as children of this container window. You can instantiate the CExtNCSB < CExtTreeCtrl > object dynamically and make it using the <b>middle container mode</code> in parameters of the CExtNCSB template class constructor:

 // in scope of main frame class declaration:
CExtTreeCtrl * m_pWndTree;

// in main frame’s constructor
CMainFrame::CMainFrame()
            : m_pWndTree( NULL )
            . . .
{
            . . .
            m_pWndTree = new CExtNCSB < CExtTreeCtrl > ( true, true );
            . . .
}

// in main frame’s destructor
CMainFrame::~CMainFrame()
{
            . . .
            if( m_pWndTree != NULL )
            {
                        delete m_pWndTree;
                        m_pWndTree = NULL;
            }
            . . .
}
You should simply create the m_pWndTree window as child of the CExtControlBar window in main frame’s OnCreate() method.

Lars Mohr Jan 13, 2009 - 5:00 AM

Perfect... Exactly what I need...


Thank you...

Offer Har Jan 12, 2009 - 4:41 PM

Dear Support,


Does this apply to grids’ CExtNSB as well?