|| | |||Browse by category|
How can I prevent the user from making hidden columns visible with a double-click?
The grid always calls the virtual member OnTrackColWidth(nCol) before it will restore hidden columns.
So, you should override this method and return FALSE if you don't want the user to be able to restore the column. OnTrackColWidth(nCol) will also be called for visible columns to determine if the columns width can be changed. By calling IsColHidden(nCol) you can determine whether the columns is visible or hidden.
|BOOL CMyGrid::OnTrackColWidth(ROWCOL nCol)
|return FALSE; // Don't allow hidden columns to be restored|
|// ... but do allow visible columns to be resized