TabScreen example

Login to reply to this topic.
Thu, 2004-06-24 17:07
Joined: 2004-06-24
Forum posts: 11
Is there anyone there with a working example of CQikTabScreen?
I've tried the examples in the SDK with no luck at all. One of them makes the emulator crash   Shocked

Thanks in advance,

Horaci

Fri, 2004-06-25 08:57
Joined: 2004-06-25
Forum posts: 15
TabScreen example
Hi,
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());
}
Mon, 2004-06-28 12:04
Joined: 2004-05-21
Forum posts: 48
Bitmap on a tabscreen
Hi,

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

Mon, 2004-06-28 12:13
Anonymous (not verified)
Forum posts: 2043
TabScreen example
CQikTab has SetPicture() method. It doesnt work??
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
Mon, 2004-06-28 13:05
Joined: 2004-05-21
Forum posts: 48
Image on tabscreen
This will add image on tab not on the tabpage. I want to draw it on the page are of the tab.

Dushyant Gaur
Software Specialist,
Kodiak Networks,
No 401 Prestige Sigma, 4th Floor
3 Vittal Mallya Road
Bangalore - 560 001
India

Thu, 2004-07-15 08:25
Joined: 2004-06-16
Forum posts: 25
TabScreen example
Hi stenlik,
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
Wed, 2004-11-10 13:04
Joined: 2004-10-05
Forum posts: 4
where to write the code
Hi Stenlik,

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
Thu, 2004-11-11 18:05
Joined: 2004-08-18
Forum posts: 58
TabScreen example
I have the following question, I have a multipage dialog... is it possible to obtain the tab control of this dialog?  I need the dialog to startup but I need to programatically control which tab gets activated when it starts.

ASY

  • Login to reply to this topic.