Browse by category:
|| | ||
How do I set the column widths based on the size of my strings?
You can call:
|m_pGrid->SetColWidth(nCol, nCol, m_pGrid->Width_LPtoDP(nChars * GX_NXAVGWIDTH));|
where nChars is the number of characters in the string and GX_NXAVGWIDTH is the average width of a character.
Another possibility is to override GetColWidth(). See gridapp/browsevw.cpp for an example.
|Objective Grid: Determining the rows and columns of a selection||Objective Grid: Preventing hidden columns from becoming visible...|