Browse by category:
|| | ||
I have set EnableTrackRowHeight(GX_TRACK_ALL), but some rows are not getting resized at all. What is wrong?
p>EnableTrackRowHeight(GX_TRACK_ALL); forces the grid to call SetDefaultRowHeight() whenever the user is resizing a row.
SetDefaultRowHeight() changes the default height but that doesn't affect any cells where you have stored an individual row height with SetRowHeight().
So, what you can do is change the behavior of OnEndTracking() (which calls SetDefaultRowHeight() ) and force it to remove all individual row heights.
In the b override you can empty all previous row heights with:
You can save and restore the height of the header rows with:
|nHeight = GetParam()->m_RowHeights;|
and after emptying assign them back with:
|GetParam()->m_RowHeights = nHeight;|
|void CDevGrid::OnEndTracking(ROWCOL nRow, ROWCOL nCol, int nTrackingMode, CSize& size)
|CGXGridParam *pParam = GetParam();
CGXGridWnd::OnEndTracking(nRow, nCol, nTrackingMode, size);
if (nTrackingMode == GX_TRACKWIDTH)
|LONG nHeight = pParam->m_RowHeights;
pParam->m_RowHeights = nHeight;
|Objective Grid: Changing the appearance of a cell||Objective Grid: How can I create a 32-Bit extension DLL that...|