×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    108

    How can I get the current font color of current theme ?

    Hi, all. When constructing grid control, I encounter a problem.

    Code:
    AknListBoxLayouts::SetupFormTextCell( *iGrid, iGrid->ItemDrawer(), 1 /*Column index*/,
    
                                              LatinBold16() /*Font type*/, 
    
                                              0 /*color*/, 
    
                                              0 /*Left margin*/, 0 /*unused*/, 
    
                                              65 /*Baseline*/, 0 /*Text width*/, 
    
                                              CGraphicsContext::ECenter /*Text alignment*/, 
    
                                              TPoint(0,0) /*Start pos*/, 
    
                                              TPoint(0,0) /*End pos*/);
    As shown above, a font color is needed by the method. But I don't think hard-code any color is a good idea, how can I get the current font color of current theme?

  2. #2
    Registered User
    Join Date
    Nov 2008
    Location
    Mumbai-India
    Posts
    379

    Re: How can I get the current font color of current theme ?

    Quote Originally Posted by nadis View Post
    Hi, all. When constructing grid control, I encounter a problem.

    Code:
    AknListBoxLayouts::SetupFormTextCell( *iGrid, iGrid->ItemDrawer(), 1 /*Column index*/,
    
                                              LatinBold16() /*Font type*/, 
    
                                              0 /*color*/, 
    
                                              0 /*Left margin*/, 0 /*unused*/, 
    
                                              65 /*Baseline*/, 0 /*Text width*/, 
    
                                              CGraphicsContext::ECenter /*Text alignment*/, 
    
                                              TPoint(0,0) /*Start pos*/, 
    
                                              TPoint(0,0) /*End pos*/);
    As shown above, a font color is needed by the method. But I don't think hard-code any color is a good idea, how can I get the current font color of current theme?
    use AknsUtils::GetCachedColor() method

  3. #3
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    108

    Re: How can I get the current font color of current theme ?

    I don't know which item Id to apply, can you offer me an example? Thanks.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: How can I get the current font color of current theme ?

    Have you tried any?

  5. #5
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: How can I get the current font color of current theme ?


  6. #6
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    108

    Re: How can I get the current font color of current theme ?

    Thanks for the article, the problem is solved.
    Thank you all.

Similar Threads

  1. Replies: 2
    Last Post: 2009-03-25, 09:56
  2. Error in packaging process :(
    By a-eqla3 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2008-07-24, 20:33

Posting Permissions

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