Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User fazlay.rabbi's Avatar
    Join Date
    Jan 2011
    Posts
    12
    Hi,
    I am trying to create custom tab control using this link http://wiki.forum.nokia.com/index.php/Custom_tabs. After using the following code to create icon it gives "system error -1001".
    HTML Code:
    CFbsBitmap* bitmap=NULL;
    	bitmap=iEikonEnv->CreateBitmapL(KAvkonBitmapFile, EMbmAvkonQgn_note_info_2 );
    	CFbsBitmap* bitmap=iEikonEnv->CreateBitmapL(KAvkonBitmapFile, EMbmAvkonQgn_note_info_2, EMbmAvkonQgn_note_info_2_mask );
    	iTabGroup->SetFocusedBackgroundImage(bitmap);
    . Instead of it i used the following way to crate icon.
    HTML Code:
    CFbsBitmap* bitmap=NULL;
    	CFbsBitmap* bitmap_mask=NULL;
    	AknIconUtils::CreateIconL(bitmap, bitmap_mask, KAvkonBitmapFile, EMbmAvkonQgn_note_info_2, EMbmAvkonQgn_note_info_2_mask);
    	AknIconUtils:: SetSize( bitmap, TSize(40, 40),EAspectRatioPreserved );
    	iTabGroup->SetFocusedBackgroundImage(bitmap);
    . The problem is that in this function "tabiconArray" is not visible while title of tabIcon change. Only title changing is visible. could anyone tell me whats wrong with this. If any one used the custom tab plz provide the way of using it. I also want to set the custom tabs in Navipane. How could i set them in navipane? Plz reply.

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    -1001 (KErrExtendedWithText, basched.h) often happens when loading of bitmap fails during application startup. What is your KAvkonBitmapFile?

  3. #3
    Registered User fazlay.rabbi's Avatar
    Join Date
    Jan 2011
    Posts
    12
    I am able to show the icon in the custom tab and add them in the navipane by using the following code in void CCustomTabAppUi::ConstructL():
    Code:
    iTabGroup=CCustomTabControl::NewL(iNaviPane->Rect(),iNaviPane);
    	
    //	iTabGroup=CCustomTabControl::NewL(tabRect,NULL); 
    	iTabGroup->MakeVisible(ETrue); 
    	iTabGroup->SetFocus(ETrue); 
    
    	//iTabGroup->SetFocusedBackgroundImage(iMyIcon);
    	//iTabGroup->SetFocusedBackgroundImage(iMyIcon);
    	
    	CArrayPtr<CGulIcon>* tabiconArray = new( ELeave ) CAknIconArray(40); 
    	CleanupStack::PushL( tabiconArray ); 
    	CGulIcon* a=CGulIcon::NewL(iMyIcon,iMyIcon_mask);
    	CGulIcon* b=CGulIcon::NewL(iMyIcon1,iMyIcon_mask1);
    	tabiconArray->AppendL(a);
    	tabiconArray->AppendL(b);
    	tabiconArray->AppendL(a);
    	tabiconArray->AppendL(b);
    	tabiconArray->AppendL(a);
    
    	 CleanupStack::Pop();
    	 iTabGroup->SetIconArray(tabiconArray);
    	 
    	  CDesCArrayFlat* array = new (ELeave) CDesCArrayFlat(10);
    	 _LIT(Lasdf,"one");
    	  CleanupStack::PushL(array);
    	  array->AppendL(_L("one"));
    	  array->AppendL(_L("two"));
    	  array->AppendL(_L("three"));
    	  array->AppendL(_L("four"));
    	  array->AppendL(_L("five"));
    	  CleanupStack::Pop();
    	  // Transfers the ownership 
    	  iTabGroup->SetTabTitleArray(array);
    	  iTabGroup->SetDefaultTabByIndex(2); 
    	  //AddToStackL(iTabGroup); 
    	  
    	  iTabGroup->DrawNow(); 
    
    	CleanupStack::PopAndDestroy(2); // outputFileStream, file
    	
    	iNaviDecorator = CAknNavigationDecorator::NewL(iNaviPane, iTabGroup);
    	iNaviDecorator->SetNaviDecoratorObserver( this );
    //	//iTabGroup->RemoveFromParent();
    //	//iTabGroup->SetParent(iNaviDecorator);
    	iNaviPane->PushL(*iNaviDecorator);
    . But after adding the custom tab in the navipane by using the above way TKeyResponse CCustomTabControl::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType) function is not working. MAknNaviDecoratorObserver also not working. Could anyone one help me in this regards.
    Thanks in advance for replaying........
    Last edited by fazlay.rabbi; 2011-02-23 at 13:39.

Similar Threads

  1. probelm in custom tab.. need help
    By poojs in forum Symbian User Interface
    Replies: 10
    Last Post: 2010-10-14, 05:27
  2. Custom control doesn't display in a custom dialog
    By curiouswalker in forum Symbian User Interface
    Replies: 9
    Last Post: 2010-07-14, 06:20
  3. Custom Tab Control
    By murthy.pramod in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-11-05, 09:47
  4. How to create a custom tab control
    By murthy.pramod in forum Symbian User Interface
    Replies: 5
    Last Post: 2008-09-23, 08:14
  5. Custom tab component for j2ME ?
    By tanc08 in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2006-08-15, 01:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved