×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    339

    How to add and remove tabs dynamically?

    hi I need to randomly add and remove tabs in status pane's tab group dynamically. Say I have 3 tabs with tab ids (0,1,2) now i need to remove tab id 0.


    Code:
    void ChangeTabGroupState(TInt aDeleteId, TInt aNewActiveId)
    {
    	iTabGroup->DeleteTabL(aDeleteId);
    	iTabGroup->SetActiveTabByIndex(aNewActiveId);		
    }
    how tab ids has to be reorganized for the purpose? if 0 is removed, will tab ids(1,2) be shifted to (0,1)? how to determine
    the active tab id after deletion of a tab? thanks

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to add and remove tabs dynamically?

    Tabs have both index and id. Id stays whatever you set, index changes.

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    339

    Re: How to add and remove tabs dynamically?

    Quote Originally Posted by wizard_hu_ View Post
    Tabs have both index and id. Id stays whatever you set, index changes.
    Thanks wizard_hu_. So if a tab with index 0 is removed from tab group indexes (0,1,2) , will remaining index (1,2) be reset to (0,1)? or how to manipluate index of tab group with frequent addition and remove? thanks

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to add and remove tabs dynamically?

    Quote Originally Posted by slinx View Post
    Thanks wizard_hu_. So if a tab with index 0 is removed from tab group indexes (0,1,2) , will remaining index (1,2) be reset to (0,1)?
    Yes, it behaves as an array, because it is backed by array. If you check CAknTabGroup in the header, it has a CArrayPtr<CAknTab>* iTabArray member.

  5. #5
    Registered User
    Join Date
    Dec 2009
    Posts
    339

    Re: How to add and remove tabs dynamically?

    Thank you wizard_hu_.

Similar Threads

  1. How to create Tabs dynamically
    By yanamaddinaveen in forum Symbian User Interface
    Replies: 4
    Last Post: 2011-09-27, 08:01
  2. Navi Tabs image change dynamically .. issue
    By kapiluiet in forum Symbian User Interface
    Replies: 3
    Last Post: 2009-07-24, 07:39
  3. Navigation Tabs (or Tabs Pane) in J2ME/Series 60
    By shadisky in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-05-05, 19:48
  4. Navigation Tabs (or Tabs Pane) in J2ME/Series 60
    By shadisky in forum Mobile Java General
    Replies: 0
    Last Post: 2005-05-05, 19:43
  5. Dynamically add/remove controls
    By fredrik_o in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-11-08, 01:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×