diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-DC0E3782-82EF-5104-937C-41F24DF1E1CA.dita --- a/Symbian3/PDK/Source/GUID-DC0E3782-82EF-5104-937C-41F24DF1E1CA.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-DC0E3782-82EF-5104-937C-41F24DF1E1CA.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,23 +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); + + + + + +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.

  • After the margin width is set, call CTextView::DrawL() to ensure the line cursor will be visible.

  • Load in the bitmap used to represent the line cursor.

  • Call CTextView::SetCursorVisibilityL() to select both cursors for display.

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