×
Namespaces

Variants
Actions

Talk:How to Change CEikLabel Color in Symbian C++

From Nokia Developer Wiki
Jump to: navigation, search

Contents

Chenziteng - The code snippet that works on S60 3rd Edition emulator

   ...
   iLabel->SetEmphasis( CEikLabel::EFullEmphasis);
   iLabel->OverrideColorL( EColorLabelHighlightFullEmphasis, KRgbRed ); // red background
   iLabel->OverrideColorL( EColorLabelTextEmphasis, KRgbBlue ); // and blue text
   ...

chenziteng 09:21, 10 October 2012 (EEST)

Hamishwillee - Isn't this an addition?

Hi Chenziteng

The code above overides the colour of the label text (EColorLabelText) and background (EColorControlBackground). Your code adds support for the colour of emphasis text, not "normal" text. I'd expect that to be added to the article, not replacing the text above.

Or are you saying that the code above does not work for plain text?

Regards

H

hamishwillee 07:40, 11 October 2012 (EEST)

Chenziteng -

I'm not sure about EColorLabelText, but the EColorControlBackground doesn't work on S60 3rd Edition emulator, that is why I tried EColorLabelHighlightFullEmphasis instead.

See the discussion in this thread:

http://www.developer.nokia.com/Community/Discussion/showthread.php?237756-How-to-set-background-of-label

BR/Ziteng

chenziteng 11:33, 11 October 2012 (EEST)

Hamishwillee - Thanks very much!

Thats good to know - thanks! I've added a section in the article to cover this case. Would be nice to know when the main text "starts to work".

Regards

Hamish

hamishwillee 07:08, 12 October 2012 (EEST)

 

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×