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!
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!
Hi zs,
Check out this code, maybe you could do some testing on it and see if helps?
Best Regards,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; }
[FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
Technical Support
+358 40 8019330
[email]marko.lumivuori@nokia.com[/email][/I][/FONT]
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