×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    4

    Change Background in MFormCustomDraw

    Hi all.
    I want to have line and background skin in CEikRichTextEditor.
    I use WriteSmsTest.zip from
    ===========================================
    http://discussion.forum.nokia.com/fo...d.php?t=134722
    ===========================================
    and i replace this code in S60_3rd_FP1. It can work for have line in CEikRichTextEditor.
    But it cannot change background in CEikRichTextEditor. How do change it?

  2. #2
    Super Contributor
    Join Date
    Jul 2006
    Location
    Oulu, Finland.
    Posts
    1,174

    Re: Change Background in MFormCustomDraw

    If you talking about having default background skin, I remember that in 3rd edition you have to call BaseConstructL() in appui for Initialising app UI with standard values.

    something like below, values can be bitwise so you can pass more than one flag.
    BaseConstructL(0x08 | EAknEnableSkin);

    There is also one article of mine at wiki, which shows enabling skin support for child controls as well:
    http://wiki.forum.nokia.com/index.ph...ews/Containers.
    Last edited by vasant21; 2008-07-08 at 19:16.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    4

    Re: Change Background in MFormCustomDraw

    hi vasant21 ,
    thank you for answer.And I follow this link
    http://www.newlc.com/Enable-Skin-support-in-your.html
    But it cannot show background skin.
    If i comment
    TextLayout()->SetCustomDraw(&iFormCustomDraw);
    then Background skin can show but haven't line in editor
    How to have both background skin and line in editor?

  4. #4
    Super Contributor
    Join Date
    Jul 2006
    Location
    Oulu, Finland.
    Posts
    1,174

    Re: Change Background in MFormCustomDraw

    I guess you can try to SetSkinBackgroundControlContextL() for your control inside DrawBackground() of your MFormCustomDraw derived class, lets see if it works

  5. #5
    Registered User
    Join Date
    Apr 2008
    Posts
    4

    Re: Change Background in MFormCustomDraw

    hi vasant21 ,
    I follow this solution. But it not work. Can u help me for my code?

    ==================
    MyContainer::ConstructL(const TRect& aRect)
    {
    CreateWindowL();

    iBgContext = CAknsBasicBackgroundControlContext::NewL(KAknsIIDQsnBgAreaMain, aRect, ETrue);
    MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
    .......
    iEditor = new (ELeave) CRichTextEditor();
    iEditor->SetContainerWindowL(*this);
    iEditor->ConstructL(this, 6, 0,
    CEikEdwin::EJustAutoCurEnd |
    CEikEdwin::EOwnsWindow, // |
    //CEikEdwin::EResizable,// |
    //CEikEdwin::EUserSuppliedText,
    EGulFontControlAll,
    EGulAllFonts);
    iEditor->SetSkinBackgroundControlContextL(cc);
    .......
    SetRect(aRect);
    //skin initialization

    ActivateL();
    }
    ================
    MyContainer::ConstructL(const TRect& aRect)
    {
    CWindowGc& gc = SystemGc();
    ........................
    iEditor->TextLayout()->SetCustomDraw(&iFormCustomDraw);
    }
    ==================
    }

  6. #6
    Registered User
    Join Date
    Apr 2008
    Posts
    4

    Re: Change Background in MFormCustomDraw

    Can u help me for this problem ?

  7. #7
    Super Contributor
    Join Date
    Jul 2006
    Location
    Oulu, Finland.
    Posts
    1,174

    Re: Change Background in MFormCustomDraw

    i havent worked on such issue, but i can try if you can send me your source code.

Similar Threads

  1. How to change the default theme background
    By bkarthik_be in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-09-12, 11:20
  2. Replies: 11
    Last Post: 2008-03-28, 08:58
  3. How to change background(skin) for status pane?
    By marum in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-03-21, 03:18
  4. [announce] Google Directions via PyS60
    By neil.young in forum Symbian
    Replies: 29
    Last Post: 2008-02-15, 10:55
  5. Replies: 1
    Last Post: 2004-11-25, 03:42

Posting Permissions

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