×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    25

    How to change color of text in Button ?

    Hi
    I am trying change the button text color .Here i am using the following code.
    Please let me know ,at where make mistake by me?

    .h
    CAknButton *iButton1;

    .cpp
    _LIT(KHelpText,"");
    _LIT(KFirstButtonText,"Play");
    iButton1 = CAknButton::NewL(NULL, NULL, NULL, NULL, KFirstButtonText,KHelpText, 0, 0);
    iButton1->SetContainerWindowL(*this);
    iButton1->SetRect(TRect(TPoint(2, 48), TSize(400, 35)));
    DrawNow();
    iButton1->OverrideColorL(EColorControlText,KRgbGreen);
    iButton1->MakeVisible(ETrue);
    iButton1->ActivateL()

    Thanks
    Mahendra

  2. #2
    Super Contributor
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189

    Re: How to change color of text in Button ?

    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    25

    Re: How to change color of text in Button ?

    I already try this link's code.
    but it is not working.
    thanks
    mahendra

  4. #4
    Registered User
    Join Date
    Sep 2009
    Posts
    25

    Re: How to change color of text in Button ?

    Hi
    RAM

    you got any mistake from my code?
    one more thing i test on S60 5th edition Emulator.

    Thanks
    Mahendra

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: How to change color of text in Button ?

    can you try EColorButtonText instead of EColorControlText somebody suggested that it might work in: http://discussion.forum.nokia.com/fo...d.php?t=162176

  6. #6
    Registered User
    Join Date
    Sep 2009
    Posts
    25

    Re: How to change color of text in Button ?

    Thanks

    I resolved my problem

Similar Threads

  1. Replies: 1
    Last Post: 2009-12-07, 12:09
  2. Change label text from user thread
    By tomass311 in forum Symbian
    Replies: 4
    Last Post: 2009-11-02, 19:18
  3. How can change text of CBA into bitmap?
    By gusta72 in forum Symbian User Interface
    Replies: 1
    Last Post: 2007-02-02, 07:45
  4. how to change text of "select" and "cancel" button of menu system
    By bigboy0918 in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-11-21, 06:44

Posting Permissions

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