we set the grid style like this :
this->SiwModifyStyle(__ESIS_STH_NONE|__ESIS_STV_ITEM| __EGBS_SFB_CELLS
|__EGBS_RESIZING_CELLS_OUTER|__EGBS_DYNAMIC_RESIZING
|__EGBS_GRIDLINES,0,false);
this->SiwModifyStyleEx(__EGWS_EX_PM_COLORS,0,false);
this->BseModifyStyleEx(__EGBS_BSE_EX_PROPORTIONAL_COLUMN_WIDTHS, 0, false);
Then the header row like this:
this->OuterRowCountTopSet( 1, false );
this->ColumnAdd( NUM_COLUMNS, false );
for (UINT i = 0; i < NUM_COLUMNS; ++i)
{
CExtGridCell * pCell = GridCellGetOuterAtTop(i, 0, RUNTIME_CLASS( CExtGridCellHeader));
if (pCell)
{
pCell->ExtentSet( 50, -1 );
pCell->ExtentSet( 100);
pCell->ExtentPercentSet( COLUMN_WIDTH_PERCENTAGE[i] );
pCell->ModifyStyle(__EGCS_TA_HORZ_CENTER);
pCell->FontWeightSet(FW_BOLD);
switch( i )
{
case 0: pCell->TextSet(ALARM_TXT); break;
case 1: pCell->TextSet( NAME_TXT ); break;
case 2: pCell->TextSet( VALUE_TXT ); break;
case 3: pCell->TextSet( DESCRIPTION_TXT );
}
}
}
This seems to work in debug exactly as it’s coded above with column widths as specified. However, when built in release the columns are set to default widths which has them crammed up against the left hand side of the grid. Why does this work in Debug and not in Release?
We’re using VS2008 and Prof-UIS v2.88.