Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User zs's Avatar
    Join Date
    Aug 2008
    Posts
    23
    Hi,

    On S60 5th, I define the toolbar text in resource file. But how to change it dynamically in code. I can't find any APIs to change it. Anyone who knows how to do that?

    Thanks!

  2. #2
    Super Contributor Maveric's Avatar
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,102
    Hi zs,

    Check out this code, maybe you could do some testing on it and see if helps?

    Code:
    {
    CAknToolbar* toolbar = Toolbar();
    if ( toolbar )
    {
    CAknButton* button = static_cast<CAknButton*>( toolbar->ControlOrNull(ETest26ListBoxViewButton1Command) );
    if ( button )
    {
    CAknButtonState* lButtonState = button->State();
    lButtonState->SetTextL(_L("New text"));
    }
    }
    toolbar->DrawNow();
    
    return ETrue;
    }
    Best Regards,
    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330
    [email]marko.lumivuori@nokia.com[/email][/I][/FONT]

  3. #3
    Super Contributor tamhanna's Avatar
    Join Date
    Jul 2008
    Posts
    2,020
    Hi,
    two things:

    a) you are in the wrong category. In anotzher category, you will likely get more responses.

    b) I use this code in a Carbide-managed scenario:
    Code:
    		CAknNavigationControlContainer *iNaviContainer;
    		CAknNavigationDecorator* iNaviLabelDecorator;
    
    		CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
    		iNaviContainer = (CAknNavigationControlContainer *) sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
    		iNaviLabelDecorator = iNaviContainer->CreateNavigationLabelL();
    		static_cast<CAknNaviLabel*> (iNaviLabelDecorator->DecoratedControl())->SetTextL(_L(" "));
    		iNaviContainer->PushL(*iNaviLabelDecorator);
    		delete iNaviDecorator_;
    		iNaviDecorator_ = iNaviLabelDecorator;
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

Similar Threads

  1. Change Selected text hbackground color
    By rakesh.jaiswal in forum General Development Questions
    Replies: 2
    Last Post: 2009-05-26, 13:51
  2. Change Carbide-Generated Navi Pane Text at runtime
    By tamhanna in forum Symbian User Interface
    Replies: 3
    Last Post: 2009-02-22, 01:25
  3. How to change the text of title in messaging application?
    By shafali gupta in forum Symbian C++
    Replies: 0
    Last Post: 2008-09-18, 08:30
  4. Replies: 1
    Last Post: 2008-07-25, 14:41
  5. How to change Grid Selected Text Item?
    By ardc_21 in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-06-29, 09:15

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