×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Mumbai
    Posts
    212

    Determine if tab is present or not

    Hi,

    SetActiveTabById or SetActiveTabByIndex
    do not return anything. So if a tab by that mentioned id or index is not there how do i come to know if it?? Plz help.

  2. #2
    chishti.hameed
    Guest
    If i understood correct :

    TInt active = iTabGroup->ActiveTabIndex();
    then check what value "active" has...

  3. #3
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Mumbai
    Posts
    212

    No , i will explain

    Thanks for ur prompt reply,

    i generate tabs dynamically in view2 depending upon the listbox element selected in view1.

    If the list element is selected for the first time the tab is added to tabgroup.

    Now if i am in the listview and i select a list item whose tab is already present then i just have to activate that tab not create a new one.

    So my question is how do i know if a tab with a particular id/index exists??

  4. #4
    chishti.hameed
    Guest
    What if you count total tabs you've and then checking which one is active using:

    TInt active = iTabGroup->ActiveTabIndex();

    for how many you've total:
    TInt count = iTabGroup->TabCount();

    another way can be: use TBool variable to check if tab is already created or not . if created already then activate otherwise create.

  5. #5
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Mumbai
    Posts
    212

    Ok

    Thanks
    chishti.hameed , again
    for ur prompt reply

    Ok , it seems that there is no inbuilt function to find the thing out.

    Thanx.

  6. #6
    chishti.hameed
    Guest

    Re: Ok

    Originally posted by rathodavinash
    Thanks
    chishti.hameed , again
    for ur prompt reply

    Ok , it seems that there is no inbuilt function to find the thing out.

    Thanx.
    If i was you i would wait for reply of "SymbianYucca" for my question :-)
    or few other guys here :-)

    I'm new with symbian :P

  7. #7
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Mumbai
    Posts
    212

    You r right

    Yup, i am waiting for yucca.

  8. #8
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Mumbai
    Posts
    212

    Got it

    It was fairly simple.

    iTabGroup->TabIndexFromId(iTabidInt);

    Gives -1 if tab not present

    Cheers.

Posting Permissions

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