| | | | Browse by category |
Article ID: 713
Last updated: 11 Jun, 2018
Problem
How can I set the caret position in a edit cell?
Cause
Action
The following sample code shows you how to set the current cell to a specific cell, make the cell active and position the caret. The code also works if the cell is already active.
// Position current cell (optional) SetCurrentCell(15, 2); CGXEditControl* pControl = (CGXEditControl*) GetCurrentCellControl(); // Make sure this is a CEdit |
||
// Set Active and position caret pControl->SetActive(TRUE); pControl->SetSel(5,5); // Refresh will set the focus to the CEdit |
||
} |
This article was:
Helpful |
Not helpful
Report an issue
Article ID: 713
Last updated: 11 Jun, 2018
Revision: 3
Views: 3508
Posted: 12 Jan, 2001 by
Meltreger B.
Updated: 11 Jun, 2018 by
Meltreger B.
Others in this category
Powered by KBPublisher (Knowledge base software)