Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User PritamS60's Avatar
    Join Date
    Apr 2009
    Posts
    31
    Hi,

    I have created a single column and multiple rows Grid and had set an observer for it using SetListBoxObserver(this). I have handled the event in HandleListBoxEventL(), also created the scrollbarframe and its visibility is set CEikScrollBarFrame::EAuto. Now on the emulator screen only 5 items are being shown whereas I have got 12 items in GridModel. How to redraw the grid so that the below grid becomes visible after pressing the down-arrow on the last item on emulator screen?

  2. #2
    Super Contributor mayankkedia's Avatar
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146
    You should just pass the key events to the grid through the offerkeyevent function and the grid would take care of it by itself.

    Code:
    TKeyResponse MyContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
        {
        return iGrid->OfferKeyEventL( aKeyEvent, aType );
        }
    To get the key events make sure to add the view to the control stack doing something like :-

    Code:
    void CAddressBookAppUi::ConstructL()
        {
        BaseConstructL();
        iCurrentView = CMyAppMainView::NewL( ClientRect() );
        AddToStackL( iCurrentView );
        }
    Cheers,
    Mayank

  3. #3
    Registered User PritamS60's Avatar
    Join Date
    Apr 2009
    Posts
    31
    Hi there,

    Thanks for the early reply.
    My Appui inherits from CAknViewAppUi so I have used AddViewL(View).
    And the rest is all done but it does't work.
    Regards,
    Pritam.

  4. #4
    Regular Contributor Shilpa13's Avatar
    Join Date
    Apr 2006
    Location
    India
    Posts
    383
    Are you calling SetContainerWindowL on grid control while constructing it?
    Regards,
    Shilpa Kulkarni

  5. #5
    Registered User PritamS60's Avatar
    Join Date
    Apr 2009
    Posts
    31
    Hi,

    Yes I have set the container window for the grid control.
    The gridflag I have used is EAknListBoxSelectionGrid.

    Regards,
    Pritam.
    Regards,
    Pritam.

  6. #6
    Regular Contributor Shilpa13's Avatar
    Join Date
    Apr 2006
    Location
    India
    Posts
    383
    Ok.

    I hope you are setting the layout, primary scrolling n secondary scrolling types properly.

    Check functions SetLayoutL SetPrimaryScrollingType SetSecondaryScrollingType.

    In SDK or wiki you will find example, pdf for grid too.

    Hope it helps.
    Regards,
    Shilpa Kulkarni

  7. #7
    Registered User PritamS60's Avatar
    Join Date
    Apr 2009
    Posts
    31
    Hi,

    All those are fine.....
    But the scrollbar is not getting updated with the items or in other words I need to redraw the grid so that the below grid becomes visible after pressing the down-arrow on the last item on emulator screen.How to do that?
    OfferKeyEventL() is also done properly.
    Regards,
    Pritam.

Similar Threads

  1. scrollbar with the grid
    By agirllikeyou in forum Symbian User Interface
    Replies: 9
    Last Post: 2010-02-05, 09:46
  2. Some grid problems
    By trasher in forum Symbian User Interface
    Replies: 15
    Last Post: 2010-01-21, 19:15
  3. Replies: 1
    Last Post: 2009-05-16, 10:30
  4. How to make simple GRID list with border and highlighted selection.
    By khurshed79 in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-01-25, 10:25
  5. Grid Cells are not visible
    By sarayu in forum Symbian C++
    Replies: 1
    Last Post: 2008-03-07, 07:59

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