Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User Jakub123123's Avatar
    Join Date
    Sep 2012
    Posts
    5
    Hello,
    I tried many things with setting Emphasis and overriding color of EColorControlBackground but none seem to work. So how I can change the background of label?

  2. #2
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,672
    easiest way would propably be not using labels, instead you could simply use Drawtext function from Gc, then you could use any brush patterns (or just transparenc background) with text drawing. You could also make your own custom Label with CCoeControl, incase you really want to do it that way..

  3. #3
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Strange, based on http://www.developer.nokia.com/Commu...ymbian_C%2B%2B or http://www.developer.nokia.com/Commu..._use_CEikLabel, I would assume they work. Or at least worked some time ago.
    Which device or emulator do you test with?

  4. #4
    Nokia Developer Champion vineet.jain's Avatar
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,840
    paste here the piece of code which you tried.

  5. #5
    Registered User Jakub123123's Avatar
    Join Date
    Sep 2012
    Posts
    5
    tried every combination of those...
    label->OverrideColorL( EColorLabelText, KRgbWhite);
    label->OverrideColorL(EColorControlBackground, KRgbWhite);
    label->OverrideColorL( EColorLabelHighlightFullEmphasis, KRgbRed );
    label->SetEmphasis( CEikLabel::EFullEmphasis);
    label->SetEmphasis( CEikLabel::EPartialEmphasis);

    on device:
    S60 3rd edition emulator

  6. #6
    Nokia Developer Champion chenziteng's Avatar
    Join Date
    May 2004
    Posts
    2,265
    The code below works for me on S60 3rd Edition emulator.

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

Similar Threads

  1. on device N-97 background image get disappear or get black background
    By amitsharma_ujj in forum [Archived] Qt Mobility Project
    Replies: 13
    Last Post: 2011-05-06, 08:05
  2. Replies: 11
    Last Post: 2008-03-28, 08:58
  3. how to create a label with semi-transparent background?
    By falafala in forum Symbian User Interface
    Replies: 5
    Last Post: 2008-03-25, 10:45
  4. Dialog with label background problem
    By erst in forum Symbian User Interface
    Replies: 0
    Last Post: 2007-12-06, 19:02
  5. how to get background color of a label
    By anupid in forum Symbian User Interface
    Replies: 4
    Last Post: 2007-02-02, 06:32

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved