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 General Discussion » Can Resize CExtTreeGridWnd Column? Collapse All
Subject Author Date
Kit Kwan Feb 27, 2008 - 9:30 AM

Hi, I’m trying to enable the resizing of the column. According to the documentation, I just need to call ExtentSet for min, current and max size. I did that, the columns appear, but I still can’t resize. Am I missing a step? Below is my code. Thanks.

CExtTreeGridWnd        m_treeSource;
    if (m_treeSource.Create(this, srcRect, IDC_TREE_SOURCE, 0, WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN, NULL))
    {
        m_treeSource.SiwModifyStyle( __ESIS_STH_PIXEL|__ESIS_STV_ITEM|__EGBS_SFB_CELLS, 0, false );
        m_treeSource.SiwModifyStyleEx( __EGWS_EX_PM_COLORS, 0, false );
        m_treeSource.OuterRowCountTopSet( 1L, false );
        m_treeSource.ColumnAdd( 3L, false );
        CString s;
        for( LONG x = 0; x < m_treeSource.ColumnCountGet(); x ++ )
        {
            s.Format( _T("Column %d"), INT(x) );
            CExtGridCell * pCell = m_treeSource.GridCellGetOuterAtTop( x, 0L, RUNTIME_CLASS( CExtGridCellHeader ) );
            pCell->TextSet( s );
            pCell->ExtentSet( 200, 0 );
            pCell->ExtentSet( 50, -1 );
            pCell->ExtentSet( 500, 1 );
        }

        m_treeSource.OnSwRecalcLayout(TRUE);
        m_treeSource.OnSwDoRedraw();
}

Kit Kwan Feb 28, 2008 - 1:03 AM

I was missing the __EGBS_RESIZING_CELLS_OUTER_H style. I knew it was something simple like that!