| | | | Browse by category |
Article ID: 690
Last updated: 11 Jun, 2018
Problem
How can I make the last column fill the rest of the window's area? In other words, I don't want an empty gray area to appear after the last column.
Cause
Action
You should override GetColWidth() as follows:
int CDaoQueryView::GetColWidth(ROWCOL nCol) { |
||||
int nWidth = CGXGridCore::GetColWidth(nCol);
// Make the last column fill the rest of |
||||
CRect rect = GetGridRect(); nCol = GetClientCol(nCol); if (nCol > 0) |
||||
nWidth = max(nWidth, rect.Width() - CalcSumOfClientColWidths(0, nCol-1) - 1); | ||||
}
return nWidth; |
||||
} |
This could be done the same way with GetRowHeight().
This article was:
Helpful |
Not helpful
Report an issue
Article ID: 690
Last updated: 11 Jun, 2018
Revision: 3
Views: 1624
Posted: 23 Jan, 2001 by
Meltreger B.
Updated: 11 Jun, 2018 by
Meltreger B.
Others in this category
Powered by KBPublisher (Knowledge base software)