|
|
|
|
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.
Subject |
Author |
Date |
|
Alex Shugai
|
Sep 3, 2006 - 10:54 PM
|
I need to preset width for columns of CExtGridWnd grid. The only working piece of code I found is:
CExtGridCellHeader * pCellHeader = STATIC_DOWNCAST(CExtGridCellHeader, mGrid->GridCellGetOuterAtTop(0L, 0L, RUNTIME_CLASS(CExtGridCellHeader))); ASSERT_VALID(pCellHeader); pCellHeader->ExtentSet(inWidth, 0);
It requires me to have a top outer row of cells in the grid. FAQ says this top row is needed to store the columns width. I don’t need the top row, I just need a plain grid - no fixed title rows. Is there a way to setup columns width and not to have a top row?
I found it strange that I can create a grid and start inserting columns, but I can’t specify the width of the columns directly, because columns width is not a grid property but rather belongs to some of the grid cells.
|
|
Technical Support
|
Sep 4, 2006 - 11:37 AM
|
You can hide the row by setting its height to zero with the CExtGridBaseWnd::OuterRowHeightSet() method.
|
|
Alex Shugai
|
Sep 4, 2006 - 4:15 PM
|
I can, but I need then to remember that anytime I add/delete rows I don’t mess with row 0. Is there any other way to setup the column width without using top outer row.
|
|
Technical Support
|
Sep 5, 2006 - 11:14 AM
|
The number of inner rows and the number of outer rows do not depend on each other, so the first inner row number always starts from zero.
|
|