×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    391

    Red face How to change the CEikLabel text color and keeping it transparent together?

    We know when we follow the below method the label text color will change to blue,but at the same time the label background color change to black, not transparent now? Then How can we change the CEikLabel text color and keeping it transparent together? Thanks in advance!

    label->OverrideColorL( EColorLabelTextEmphasis, KRgbBlue );
    label->SetEmphasis( CEikLabel::EPartialEmphasis );
    label->DrawDeferred();

  2. #2
    Registered User
    Join Date
    Dec 2005
    Posts
    1

    Re: How to change the CEikLabel text color and keeping it transparent together?

    Try this:

    label->OverrideColorL( EColorLabelTextEmphasis, KRgbBlue );
    label->SetEmphasis( CEikLabel::EPartialEmphasis );
    label->DrawDeferred();
    label->SetBrushStyle( CWindowGc::ENullBrush );

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    391

    Re: How to change the CEikLabel text color and keeping it transparent together?

    Are u sure there is
    SetBrushStyle fuction in CEikLabel class?

  4. #4
    Regular Contributor
    Join Date
    Apr 2007
    Posts
    68

    Re: How to change the CEikLabel text color and keeping it transparent together?

    Quote Originally Posted by tuojamie View Post
    Try this:

    label->OverrideColorL( EColorLabelTextEmphasis, KRgbBlue );
    label->SetEmphasis( CEikLabel::EPartialEmphasis );
    label->DrawDeferred();
    label->SetBrushStyle( CWindowGc::ENullBrush );
    Good idea!

  5. #5
    Regular Contributor
    Join Date
    May 2008
    Posts
    139

    Re: How to change the CEikLabel text color and keeping it transparent together?

    Quote Originally Posted by mrzero View Post
    Good idea!
    If I use label->SetBrushStyle( CWindowGc::ENullBrush ), the invalidate does not work as expected. Background will not be painted again because of ENullBrush

  6. #6
    Registered User
    Join Date
    Feb 2007
    Posts
    15

    Re: How to change the CEikLabel text color and keeping it transparent together?

    I have tested these code and they worked fine.

    Please refer follow link, I hope it may help.

    http://www.newlc.com/Enable-Skin-support-in-your.html

Posting Permissions

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