×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    16

    CAknTabGroup for S60 5th edition

    Hi guys,

    How to make CAknTabGroup touch enabled for S60 5th edition ?
    Last edited by mario_hendarwan; 2009-07-17 at 12:34.

  2. #2
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: CAknTabGroup for S60 5th edition

    Just try to handle pointer events. See SDK help:
    CAknTabGroup::HandlePointerEventL ( const TPointerEvent & aPointerEvent )
    Handles pointer events in tabs.

  3. #3
    Registered User
    Join Date
    Dec 2008
    Posts
    16

    Re: CAknTabGroup for S60 5th edition

    But how to now the stylus hitted the arrow part(newt/prev arrow) ?

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

    Re: CAknTabGroup for S60 5th edition

    The tabs are normally in the control pane, which resides outside of your window. I do not think that you would have to forward events towards the tab group.
    According to this thread: http://discussion.forum.nokia.com/fo...d.php?t=167265 the tabs are actually generating left/right keypress events for you, which also indicates that you are not expected to forward events to the tabs.
    Have you tried how S60CppExamples\AutoAdaptedToTouchEx\MyView behaves? It seems to use tabs.

  5. #5
    Registered User
    Join Date
    Jan 2009
    Posts
    1

    Re: CAknTabGroup for S60 5th edition

    Hi,

    Function HandlePointerEventL() of CAknTabGroup will call MTabObserver's callback TabChnangedL(TInt aIndex);
    So the solution is to make your class derive from MAknTabObserver, and then overwrite the virtual function, for example:

    Code:
    #include <akntabobserver.h> //MAknTabObserver
    
    class CMyAppUi : public CAknViewAppUi, MAknTabObserver
         {
         //...
         // From MAknTabObserver
         void TabChangedL( TInt aIndex );
         //...
         };
    and in the construction function of your class, register it as the observer:
    Code:
    void CMyAppUi::ConstructL()
         {
         //...
         iTabGroup = ( CAknTabGroup* )iDecoratedTabGroup->DecoratedControl();
    
         // Register this object as a tab observer
         iTabGroup->SetObserver( this );
         //...
         }
    Finally, you need handle the TabChangedL() callback as you want.

    Code:
    void CMyAppUi::TabChangedL( TInt aIndex )
         {
         // Do event handling code here...
         }
    Note that, in 5.0 SDK, only clicking on tabs other than the activated one will callback this observer.
    This is the limitation...

    Cheers.
    --
    (Larry) LIU Xinyu
    http://sites.google.com/site/algoxy/

Similar Threads

  1. Series 40 5th Edition SDK Includes JSR-211
    By Nokia Ron in forum Mobile Java Tools & SDKs
    Replies: 11
    Last Post: 2011-11-02, 16:07
  2. Icons in s60
    By drizzt6 in forum Mobile Java General
    Replies: 5
    Last Post: 2009-03-06, 09:32
  3. Small change required in S60 5th Edition SDK Help and C++ Developer Library
    By kiran10182 in forum Feedback - Nokia Developer Services & Infrastructure
    Replies: 3
    Last Post: 2008-12-15, 19:12
  4. Replies: 1
    Last Post: 2008-11-21, 12:12
  5. Who to start UI development in Series 60 5th edition??
    By rohanwaugh in forum Symbian User Interface
    Replies: 3
    Last Post: 2008-11-03, 06:14

Posting Permissions

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