×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    May 2007
    Posts
    91

    Navigation Pane text change...

    Dear All,

    I want to change the navigation pane text of my application.
    I have used following code in my container class:

    CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
    iNaviContainer = (CAknNavigationControlContainer *)statusPane->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
    static_cast<CAknNaviLabel*>(iNaviLabelDecorator->DecoratedControl())->SetTextL(_L("Text"));
    NaviContainer->PushL(*iNaviLabelDecorator);

    This works fine but when I close the application it gives me the error as ALLOC: 1ff88e8c0....

    Can anyone guide me in the matter?

    Thanx & Regards,
    Vinod.

  2. #2
    Regular Contributor
    Join Date
    May 2004
    Location
    Bangalore, India
    Posts
    118

    Re: Navigation Pane text change...

    Hi Vinod,

    Did you mean Title pane title? That you can change using following code...

    CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
    CAknTitlePane* tp=(CAknTitlePane*)sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle));
    tp->SetTextL((_L("Text"));
    Dushyant Gaur
    Sling Media,
    Bangalore
    cell:+91 9342276086
    email: dushyantg@slingmedia.com

  3. #3
    Regular Contributor
    Join Date
    May 2004
    Location
    Bangalore, India
    Posts
    118

    Re: Navigation Pane text change...

    Hi Vinod,

    You can try this...It works fine for me..

    CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
    iNaviPane = ( CAknNavigationControlContainer * )sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) );
    if(iNaviDecorator)
    {
    iNaviPane->Pop();
    delete iNaviDecorator;
    iNaviDecorator = NULL;
    }
    TBuf<50> naviLabel;
    naviLabel.FillZ();
    naviLabel.Copy(_L("Your Title"));
    iNaviDecorator = iNaviPane->CreateNavigationLabelL( naviLabel );
    iNaviPane->PushL( *iNaviDecorator );
    Dushyant Gaur
    Sling Media,
    Bangalore
    cell:+91 9342276086
    email: dushyantg@slingmedia.com

  4. #4
    Regular Contributor
    Join Date
    May 2007
    Posts
    91

    Re: Navigation Pane text change...

    My code also works fine... but it crashes when I close the whole application...

  5. #5
    Regular Contributor
    Join Date
    May 2007
    Posts
    91

    Re: Navigation Pane text change...

    Dear Dushyant....

    I used your code but still the same result...

    Thanx & Regards,
    Vinod.

  6. #6
    Regular Contributor
    Join Date
    Apr 2006
    Location
    India
    Posts
    383

    Re: Navigation Pane text change...

    Hi!

    Can u post how u are taking or creating your iNaviLabelDecorator?

    Some more detailed code than posted earlier..
    Regards,
    Shilpa Kulkarni

  7. #7
    Regular Contributor
    Join Date
    Nov 2005
    Location
    Aalborg, Denmark
    Posts
    296

    Re: Navigation Pane text change...

    Hi VinodRaut,
    You are getting a panic (ALLOC) due to a memory leak somewhere in your code (actually at the address 1ff88e8c0), so you need to check your code to find some resources that are not released. There are some techniques how to do this, however the easiest is just to "disable" code until the leak disappears, and then start to slowly "enable" code until it appears again - by then you should have a pretty good idea of where in your code the problem is...

  8. #8
    Regular Contributor
    Join Date
    May 2007
    Posts
    91

    Re: Navigation Pane text change...

    Quote Originally Posted by Shilpa13 View Post
    Hi!

    Can u post how u are taking or creating your iNaviLabelDecorator?

    Some more detailed code than posted earlier..
    CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();

    iNaviContainer = (CAknNavigationControlContainer *)statusPane->ControlL(TUid::Uid(EEikStatusPaneUidNavi));

    iNaviLabelDecorator = iNaviContainer->CreateNavigationLabelL();

    static_cast<CAknNaviLabel*>(iNaviLabelDecorator->DecoratedControl())->SetTextL(_L("Text"));

    iNaviContainer->PushL(*iNaviLabelDecorator);

    Hope u find some bug & help me....

    Thanx & Regards,
    Vinod.

  9. #9
    Regular Contributor
    Join Date
    Apr 2006
    Location
    India
    Posts
    383

    Re: Navigation Pane text change...

    Hi!

    Leak is here..

    CreateNavigationLabelL :Creates and returns a new navigation decorator object containing navigation label.

    The ownership of the object is transferred to the application.

    So u need to delete iNaviLabelDecorator :-)

    Hope this solves ur problem..

    Make sure about deleting iNaviLabelDecorator(if existing) befor creating new.

    In the end(destructor) also delete iNaviLabelDecorator providing NULL check.

    I am considering iNaviLabelDecorator as ur member variable.
    Regards,
    Shilpa Kulkarni

  10. #10
    Regular Contributor
    Join Date
    Apr 2006
    Location
    India
    Posts
    383

    Re: Navigation Pane text change...

    One more thing.

    U are saying iNaviContainer->PushL(*iNaviLabelDecorator);

    Take care of popping it too..
    Regards,
    Shilpa Kulkarni

Similar Threads

  1. color of text in navigation label
    By s4028469 in forum Symbian User Interface
    Replies: 2
    Last Post: 2007-09-12, 22:53
  2. Replies: 0
    Last Post: 2004-11-24, 18:49
  3. Replies: 3
    Last Post: 2004-09-17, 06:00
  4. How to change the text of Controlpane
    By chcomic in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-04-02, 06:13
  5. putting background in title and navigation pane
    By pncbose in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-02-05, 12:51

Posting Permissions

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