×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    155

    the cursor in CEikEdwin controls

    i create a CEikEdwin controls ,it has a short and thick cursor when the focus at it when first display.
    but if you leave this controls and enter in again,the cursor change a long and thin style?


    CEikEdwin* edwin = new ( ELeave ) CEikEdwin();
    TInt flag = CEikEdwin::EJustAutoCurEnd | CEikEdwin::ENoWrap | CEikEdwin::ELineCursor;
    edwin->ConstructL( flag, 10, 64, 1);
    edwin->SetContainerWindowL( *this );
    edwin->SetBorder( TGulBorder::ENone );
    edwin->SetAknEditorInputMode( EAknEditorTextInputMode );
    edwin->SetAknEditorCase( EAknEditorLowerCase );
    edwin->SetFocus( ETrue );

    CCharFormatLayer* FormatLayer = CEikonEnv::NewDefaultCharFormatLayerL();
    TCharFormat charFormat;
    TCharFormatMask charFormatMask;
    FormatLayer->Sense(charFormat, charFormatMask);
    Mem::FillZ(&charFormat, sizeof(TCharFormat));
    Mem::FillZ(&charFormatMask, sizeof(TCharFormatMask));
    TFontSpec sFontSpec = iFont->FontSpecInTwips();
    charFormat.iFontSpec.iTypeface = sFontSpec.iTypeface;
    charFormatMask.SetAttrib(EAttFontTypeface);
    charFormat.iFontSpec.iHeight = sFontSpec.iHeight;
    charFormatMask.SetAttrib(EAttFontHeight);
    charFormat.iFontPresentation.iTextColor = KRgbBlack;
    charFormatMask.SetAttrib(EAttColor);
    FormatLayer->SetL(charFormat, charFormatMask);
    edwin->SetCharFormatLayer( FormatLayer );
    TInt baseline = ( iHeight + iFont->FontMaxHeight() + 1 ) / 2;
    edwin->SetTextBaselineSpacing( baseline );
    edwin->HandleTextChangedL();
    edwin->SetRect( TRect(iWidth / 10 - 20,iHeight / 10 + 50,iWidth - 50 ,15) );
    edwin->ActivateL();

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: the cursor in CEikEdwin controls

    It would surely be related to your char format code.
    Pls try make simple edwin wothout any char format and then apply this . You will get to know about the reason.
    Regards,
    Shafali

  3. #3
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    155

    Re: the cursor in CEikEdwin controls

    it must call setfocus after activel.

    it's ok.

Similar Threads

  1. Getting text from dynamic CEikEdwin controls
    By juannoguera in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-01-12, 17:57
  2. How to implement this CEikEdwin sytle?
    By ss1969 in forum Symbian User Interface
    Replies: 0
    Last Post: 2007-10-30, 06:22
  3. Custom controls or extend existing controls?
    By mayur_24 in forum Symbian User Interface
    Replies: 2
    Last Post: 2007-10-05, 16:16
  4. Topology among controls
    By gusta72 in forum Symbian User Interface
    Replies: 3
    Last Post: 2006-10-19, 07:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×