How can I specify my own CCoeControl as NaviPane ?

Login to reply to this topic.
Tue, 2003-10-07 14:55
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 2009
I am trying to implement a custom CCoeControl to replace the Navigation Pane. While my CCoeControl is working and drawing fine, I cannot retrieve the automatically the position and size it shall have (those of the navigation pane):

Code:
   CEikStatusPane *sp = ((CAknAppUi*)iEikonEnv->EikAppUi())->StatusPane();
   iNaviPane = (CAknNavigationControlContainer*)
                     sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
   CMyPane* myPane=CMyPane::NewL(TRect(TPoint(0,0),TSize(176,32))); // <-- Dummy values
   iNaviDecorator = CAknNavigationDecorator::NewL(iNaviPane,MyPane);
   iNaviPane->PushL(*iNaviDecorator);


I tried iNaviPane->Top()->DecoratedControl()->Rect() instead of the TRect(TPoint(0,0),TSize(176,32)) above but this was not working probably because I just have an empty pane by default.

Is there no way to retrieve to get myPane's TRect specified automatically ?

[Update]: the size looks correctly set by NS60 framework, but it still does not display at the correct position....

Thanks
Eric

Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant


Wed, 2003-10-08 19:17
Joined: 2003-08-31
Forum posts: 8
How can I specify my own CCoeControl as NaviPane ?
A pretty stupid solution could be to get the usable area using ClientRect() from the AppUi , before you flush the standard NaviPane. From ClientRect, you'll get the values iTL and iBr of the usable area. Then the NaviPane is probably:
 Top Left = (0,0)
 Bottom right = (iBR.X, iTL.Y)

Ie, the Navipane stops where the usable area would start...

That's just an idea, don't know if it is somehow functional.

-BertQ
Sat, 2004-01-31 09:16
Joined: 2004-01-31
Forum posts: 2
How can I specify my own CCoeControl as NaviPane ?
Hi Eric,

Did you finally manage to find some solution to your problem, described in the original post?

Thanks,
Adi
Mon, 2004-02-02 12:01
Joined: 2003-10-10
Forum posts: 32
How can I specify my own CCoeControl as NaviPane ?
I think you should try this:

TRect paneRect = StatusPane()->PaneRectL(TUid::Uid(EEikStatusPaneUidNavi));
Fri, 2005-09-09 11:32
Joined: 2004-12-31
Forum posts: 83
Re: How can I specify my own CCoeControl as NaviPane ?
hi eric

am tryin to put an image and some text on the navigation pane.
i am doing it the same way as you have done. but after the execution of draw method of my control it gives panic.
can you please tell ho do i need to implement my CCoeControl.

am drawin some text right now inthe draw method. also i want to know when do i have to activate my control. cause am doing it in the ConstructL of control. is this can be a problem.
what other method do i need to implement.

please help.


warm regards

saurabh

  • Login to reply to this topic.