|
|
User login
Feeds |
Help with CQikTabScreens Displaying Improperly
|
|||||
| Mon, 2004-11-22 20:56 | |
|
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); |
|
Forum posts: 13
Forum posts: 11
Just a thought.
-- Mike
Forum posts: 13
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
Forum posts: 696
have you done (for each page):
and have you done:
in the view that creates the tab screen and tabs and contained views?
Maybe these would help?
Forum posts: 57
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.