Help with CQikTabScreens Displaying Improperly

Login to reply to this topic.
Mon, 2004-11-22 20:56
Joined: 2004-11-09
Forum posts: 11
I'm feeling pretty sheepish here, but I cannot get a TabScreen to work properly.  I have been through the documentation example and the examples on these forums (many many thanks).  However...

In the code I will post below, I have two tabs.  The containers that each tab page has do not display properly.  The second container displays no matter which tab you click on.  The proper tab comes to the front, but the 2nd container always displays.

Thanks for any clues.

 -- Mike

Code:
// Create a tab screen object on the heap.
iConfigScreen = new (ELeave) CQikTabScreen();
iConfigScreen->SetContainerWindowL(*this);
iConfigScreen->ConstructL(CQikTabGroup::EEachTabAsWideAsNeeded);

// Set tab screen control's extent.
iConfigScreen->SetExtentToAllAvailableSpaceL();

_LIT(KGeneralSettings,"General");
_LIT(KNTPSettings,"NTP");
_LIT(KChimeSettings,"Chime");

tabGeneral = new (ELeave) CQikTab;
tabGeneral->SetText(KGeneralSettings);
CleanupStack::PushL(tabGeneral);

pageGeneral = new(ELeave) CQikTabScreenPage;
CleanupStack::PushL(pageGeneral);
pageGeneral->ConstructL(*iConfigScreen);

iConfigScreen->AddTabPageL(tabGeneral, pageGeneral);
CleanupStack::Pop(2);

TRect rectGeneralContainer = pageGeneral->Rect();
iGeneralContainer = new (ELeave) CClockWksContainer;
iGeneralContainer->ConstructL(rectGeneralContainer);
pageGeneral->AddControlL(iGeneralContainer);

tabNTP = new (ELeave) CQikTab;
tabNTP->SetText(KNTPSettings);
CleanupStack::PushL(tabGeneral);
   
pageNTP = new(ELeave) CQikTabScreenPage;
CleanupStack::PushL(tabGeneral);
pageNTP->ConstructL(*iConfigScreen);

iConfigScreen->AddTabPageL(tabNTP, pageNTP);
CleanupStack::Pop(2);

TRect rectNTPContainer = pageNTP->Rect();
iNTPContainer = new (ELeave) CClockWksNTPContainer;
iNTPContainer->ConstructL(rectNTPContainer);
pageNTP->AddControlL(iNTPContainer);

// set this view as a tab screen observer
iConfigScreen->SetObserver(this);
iConfigScreen->SetCurrentTabL(0);
iConfigScreen->ActivateL();

TRect rectTl = pageGeneral->Rect();
rectTl.iTl.iY = iAppUi->ClientRect().iTl.iY;
iGeneralContainer->SetRect(rectTl);

TRect rectnTl = pageNTP->Rect();
rectnTl.iTl.iY = iAppUi->ClientRect().iTl.iY;
iNTPContainer->SetRect(rectnTl);

Tue, 2004-11-23 07:03
Joined: 2004-07-08
Forum posts: 13
Help with CQikTabScreens Displaying Improperly
If you want 1st container display when you click 1st tab, you must hide (makevisible(EFalse))2rd container and show(makevisible(ETrue)) 1st container.
Tue, 2004-11-23 13:01
Joined: 2004-11-09
Forum posts: 11
Help with CQikTabScreens Displaying Improperly
Quote from: hungpk
If you want 1st container display when you click 1st tab, you must hide (makevisible(EFalse))2rd container and show(makevisible(ETrue)) 1st container.
I thought of this, too.  But I thought the whole idea of a tabbed interface was that this kind thing was automatic.  Isn't that the definition of a tabbed interface?  And if this is true, the mechanism of adding pages to tabs and controls to pages is a lot of work if you have to expose each control/container yourself.

Just a thought.

  -- Mike
Wed, 2004-11-24 10:51
Joined: 2004-07-08
Forum posts: 13
Help with CQikTabScreens Displaying Improperly
I don't think so. If you add Edwin hay Label to Page with a tab, it will hide if you choose other tab. I don't know why Container is difference.
Wed, 2004-11-24 16:05
Anonymous (not verified)
Forum posts: 2043
Help with CQikTabScreens Displaying Improperly
Quote from: hungpk
I don't think so. If you add Edwin hay Label to Page with a tab, it will hide if you choose other tab. I don't know why Container is difference.

I don't either.  I rewrote the code to detect when a tab is clicked on.  THen I "manually" hie and expose containers.  It works fine.  But this is not how I thought it should go.

  -- Mike
Thu, 2004-11-25 13:50
Joined: 2003-12-05
Forum posts: 696
Help with CQikTabScreens Displaying Improperly
Hi,

have you done (for each page):
Code:
iPage->SetContainerWindowL(*iTabScreen);

and have you done:
Code:
SetComponentsToInheritVisibility();

in the view that creates the tab screen and tabs and contained views?

Maybe these would help?
Thu, 2005-10-06 10:35
Joined: 2004-11-05
Forum posts: 57
Re: Help with CQikTabScreens Displaying Improperly
Strugglig with the exact same problems. DARRRNN


WHY are not the keypointerevents eaten and handeled by the TabScreen?


I tried those two lines of code, but it results in this error:

WSERV 11


Do you have any other suggestions.


Thanks in adwance. It is a relieve that other people have same problems as me.

IM GRATEFUL to anyone say something about how they solved this delicate problem.
  • Login to reply to this topic.