|
|
User login
Feeds |
TabScreen example
|
|||||
| Thu, 2004-06-24 17:07 | |
Forum posts: 15
this works: I just cut and paste, so you must rewrite it a little bit...
Bye STeN
-----------------------------------------------------------------
iTabScreen = new (ELeave) CQikTabScreen;
iTabScreen->SetContainerWindowL(*this);
iTabScreen->ConstructL(CQikTabGroup::EEachTabAsWideAsNeeded);
// Set tab screen control's extent.
iTabScreen->SetExtentToAllAvailableSpaceL();
// Create constant literal descriptors - later
// get it to resource file to faciliate the process of localization
_LIT(KTextSettings,"Settings");
_LIT(KTextByNickname,"By nickname");
////////////////////////////////////////////////////
// Create tabs (containing text) and pages
////////////////////////////////////////////////////
// Create a CQikTab object and set it with some text.
CQikTab* tabSettings = new (ELeave) CQikTab;
tabSettings->SetText(KTextSettings);
CQikTab* tabByNickname = new (ELeave) CQikTab;
tabByNickname->SetText(KTextByNickname);
// create pages
CQikTabScreenPage* pageSettings = new(ELeave) CQikTabScreenPage;
pageSettings->ConstructL(*iTabScreen);
CQikTabScreenPage* pageByNickname= new(ELeave) CQikTabScreenPage;
pageByNickname->ConstructL(*iTabScreen);
////////////////////////////////////////////////////
// Create containers (containing text) and pages
////////////////////////////////////////////////////
TRect rectContainer = pageSettings->Rect();
iContainerSettings = new (ELeave) CCont1;
iContainerByNickname = new (ELeave) CCont2;
iContainerSettings->ConstructL(rectContainer);
iContainerByNickname->ConstructL(rectContainer);
pageSettings->AddControlL(iContainerSettings);
pageByNickname->AddControlL(iContainerByNickname);
// Add the tab and page(which actaully holds the
// containers) to the tab screen.
iTabScreen->AddTabPageL(tabSettings, pageSettings);
iTabScreen->AddTabPageL(tabByNickname, pageByNickname);
// set this view as a tab screen observer
iTabScreen->SetObserver(this);
iTabScreen->SetCurrentTabL(0);
iTabScreen->ActivateL();
// necessary for setting top left corner
TRect rectTl = pageByNickname->Rect();
rectTl.iTl.iY = iAppUi->ClientRect().iTl.iY;
iContainerSettings->SetRect(rectTl);
iContainerByNickname->SetRect(rectTl);
// now set proper height and width
iContainerSettings->SetSize(pageByNickname->Size());
iContainerByNickname->SetSize(pageByNickname->Size());
}
Forum posts: 48
Is there anyone there with a working example of drawing a image on a Tabscreen. I need to draw a bitmap along with a text on a tabscreen. Whenever I try to do it, the bitmap is drawn on the view instead of tabscreen. Any sample code will be helpful.
Thanx in advance
Dushyant Gaur
Software Specialist,
Kodiak Networks,
No 401 Prestige Sigma, 4th Floor
3 Vittal Mallya Road
Bangalore - 560 001
India
Or call something like this for image in mbm:
imageTab->SetPictureFromFileL(KPathToImage, EMbmQuartzArrowup, EMbmQuartzArrowupm);
It is little described in UIQ 2.1 SDK documentation
Bye, STeN
Forum posts: 48
Dushyant Gaur
Software Specialist,
Kodiak Networks,
No 401 Prestige Sigma, 4th Floor
3 Vittal Mallya Road
Bangalore - 560 001
India
Forum posts: 25
I have tried to create a multipage dialog. But my pages are coming in the main windoiw, the one which comes when u open ur application because i wrote my code there. But when i am writing it as a function to be invoked when a menu option is selected i am getting error at the statement
iAppView->iTabScreen->SetContainerWindowL(*this);
iAppView is a AppView pointer declared in UI class.
What should i do if i want the pages to apper when a menu option is selected.
the code is complinig if i keep
iAppView->iTabScreen->SetContainerWindowL(*iAppView);
But givivng runtime error
Also in ur code i didnt understand whtat type ur iContainerSettings is.
Is it necessary that we should add a rectangle container before we add any controls? because i am adding a radiobutton control when i am displaying the pages in my main view, they are not visible.
Please answer my queries at ur earliest
Forum posts: 4
i am new to UIQ.i have some problem with creating tab screen.i tried using both the methods( rss and from code).but its not showing in the emulator.i got ur code.can u plz tell me where to insert this code and what are the changes i have to make to run the application.this is very urgent so plz can u do me this favour.
Thanks in advance
sathish
Forum posts: 58
ASY
www.fxuiq.com