How to avoid cursor blinking on a grid view

Article ID: 1292
Last updated: 16 Apr, 2018
Article ID: 1292
Last updated: 16 Apr, 2018
Revision: 3
Views: 1820
Posted: 19 Dec, 2007
by Meltreger B.
Updated: 16 Apr, 2018
by Meltreger B.

Problem


When a cell is set to readonly, the user still can select a cell and the cursor will be blinking in this cell.


Cause



Action


The following code corrects this behavior:

1. For cells with text, override these two functions:

BOOL C1stGridView::OnStartEditing(ROWCOL nRow, ROWCOL nCol) {return FALSE;}

BOOL C1stGridView::CanPaste() {return FALSE;}

2. For empty cells:

CGXStyle().SetEnabled(FALSE)

This article was:   Helpful | Not helpful
Report an issue
Article ID: 1292
Last updated: 16 Apr, 2018
Revision: 3
Views: 1820
Posted: 19 Dec, 2007 by Meltreger B.
Updated: 16 Apr, 2018 by Meltreger B.

Others in this category