diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-DC0E3782-82EF-5104-937C-41F24DF1E1CA.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-DC0E3782-82EF-5104-937C-41F24DF1E1CA.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,23 @@ + + + + + +How to set the cursor

The code in this section sets the line cursor + margin and line and text cursor visibility. In order to display the text cursor, a window group must have been set when the text view was constructed. Alternatively, one may be set by calling CTextView::SetDisplayContextL(). Before a line + cursor can be displayed, the line cursor margin width must be set and a bitmap line cursor must be specified.

The following code sets the line cursor + margin width to 20 pixels and the label + margin width to zero.

iTextView->SetMarginWidths(0,20); + // zero label margin, 20 pixel line cursor margin +iTextView->DrawL(iViewRect); // required to update the view +// Set bitmap to represent line cursor. First load it in. +iBitmap=new(ELeave) CFbsBitmap(); +iBitmap->Load(_L("\\data\\CURSORS.MBM")); +iTextView->SetLineCursorBitmap(iBitmap); +iTextView->SetCursorVisibilityL(TCursor::EFBothCursors);
\ No newline at end of file