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 » __EGBS_BSE_EX_PROPORTIONAL_COLUMN_WIDTHS question (I ask you a question again) Collapse All
Subject Author Date
tera tera May 22, 2009 - 3:09 AM

Hello.


With the standard grid, is such a movement impossible?


http://ifreeta.dee.cc/20090520/result.avi


Is it necessary to program it in the user side?

Technical Support May 23, 2009 - 11:47 AM

We have 3 white columns with fixed size. We have one blue column and it’s resizable. We have one magenta column with fixed size. First of all we need to get the header cells for this column from the top header row:

CExtGridWnd & wndGrid = . . .
CExtGridCell * pHeaderCellWhite0 = wndGrid.GridCellGetOuterAtTop( 0L, 0L );
CExtGridCell * pHeaderCellWhite1 = wndGrid.GridCellGetOuterAtTop( 1L, 0L );
CExtGridCell * pHeaderCellWhite2 = wndGrid.GridCellGetOuterAtTop( 2L, 0L );
CExtGridCell * pHeaderCellBlue = wndGrid.GridCellGetOuterAtTop( 3L, 0L );
CExtGridCell * pHeaderCellMagenta = wndGrid.GridCellGetOuterAtTop( 4L, 0L );

Then, we need to set the proportional extents for these columns:
   pHeaderCellWhite0->ExtentPercentSet( 0.0 );
            pHeaderCellWhite1->ExtentPercentSet( 0.0 );
            pHeaderCellWhite2->ExtentPercentSet( 0.0 );
            pHeaderCellBlue->ExtentPercentSet( 1.0 );
            pHeaderCellMagenta->ExtentPercentSet( 0.0 );

That’s all. These columns will be automatically resizable like demonstrated on your video. But if you want to disable resizing of the white and magenta columns by user, then you also should set the fixed widths of their columns in pixels:
   INT nSomeWidthInPixels = . . .
            pHeaderCellWhite0->ExtentSet( nSomeWidthInPixels, -1 );
            pHeaderCellWhite0->ExtentSet( nSomeWidthInPixels, 0 );
            pHeaderCellWhite0->ExtentSet( nSomeWidthInPixels, 1 );
            pHeaderCellWhite1->ExtentSet( nSomeWidthInPixels, -1 );
            pHeaderCellWhite1->ExtentSet( nSomeWidthInPixels, 0 );
            pHeaderCellWhite1->ExtentSet( nSomeWidthInPixels, 1 );
            pHeaderCellWhite2->ExtentSet( nSomeWidthInPixels, -1 );
            pHeaderCellWhite2->ExtentSet( nSomeWidthInPixels, 0 );
            pHeaderCellWhite2->ExtentSet( nSomeWidthInPixels, 1 );
            pHeaderCellMagenta->ExtentSet( nSomeWidthInPixels, -1 );
            pHeaderCellMagenta->ExtentSet( nSomeWidthInPixels, 0 );
            pHeaderCellMagenta->ExtentSet( nSomeWidthInPixels, 1 );



tera tera May 24, 2009 - 6:40 PM

Thank you very much for your advice.

The program worked well.