×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    84

    Help - Grid not displaying

    Hi,
    I am trying to display a simple grid using the resource . I have followed the steps mentined in Series_60_DP_Avkon_UI_Resources_Grids_v1_0_en.pdf
    I have the following resource :
    RESOURCE GRID r_selectiongrid
    {
    array_id = r_selectiongrid_items;
    flags = EAknListBoxSelectionGrid;
    style = r_selectiongrid_style;
    }

    RESOURCE GRID_STYLE r_selectiongrid_style
    {
    layoutflags = EAknGridHorizontalOrientation | EAknGridLeftToRight | EAknGridTopToBottom;
    primaryscroll = EAknGridFollowsItemsAndLoops;
    secondaryscroll = EAknGridFollowsItemsAndLoops;
    itemsinprimaryorient = 3;
    itemsinsecondaryorient = 3;
    gapwidth = 5; gapheight = 5;
    width = 50; height = 50;
    }


    RESOURCE ARRAY r_selectiongrid_items
    {
    items =
    {
    LBUF { txt = "Item0"; },
    LBUF { txt = "Item1"; },
    LBUF { txt = "Item2"; },
    LBUF { txt = "Item3"; },
    LBUF { txt = "Item4"; }
    };
    }


    In the CHelloWorldBasicAppView::ConstructL function i have the following code


    CAknGrid *iGrid = new( ELeave ) CAknGrid;
    iGrid->SetContainerWindowL( *this );
    TResourceReader reader;
    CEikonEnv::Static()->CreateResourceReaderLC(reader,R_SELECTIONGRID);
    iGrid->ConstructFromResourceL(reader);

    CleanupStack::PopAndDestroy(); // rr

    AknListBoxLayouts::SetupFormTextCell( *iGrid, iGrid->ItemDrawer(),
    0, LatinBold16(), 0, 0, 0, 30,
    0, CGraphicsContext::ECenter,
    TPoint(0,0), TPoint(0,0) );
    // Activate grid
    iGrid->SetRect( Rect() );
    iGrid->ActivateL();

    If i run the app no error but the grid does not get displayed. Plz let me know what is the problem in the above code.

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Help - Grid not displaying

    maybe you could try if the Wiki Grid example would work any better for you: http://wiki.forum.nokia.com/index.php/Grid_example

    yucca

  3. #3
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    84

    Re: Help - Grid not displaying

    Thanks for the reply , I have tried that. I have this code.

    CAknExPopListView::ConstructL()
    {
    GridContainer = new(ELeave) CGridContainer;
    iGridContainer->ConstructL();
    }

    With the above code also i am not getting any grid in the view. when i debug the MakeGridL() function inside iGridcontainer->ContructL gets called. but i dont know why grid is not getting displayed.

    Thanks in advance.
    Last edited by Rajani_sp; 2007-10-18 at 10:23. Reason: More details added

Similar Threads

  1. scrollbar with the grid
    By agirllikeyou in forum Symbian User Interface
    Replies: 9
    Last Post: 2010-02-05, 09:46
  2. 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
  3. How can we display a grid after click on a list box
    By jyotideep in forum Symbian User Interface
    Replies: 5
    Last Post: 2006-12-14, 04:59
  4. Grid refresh problem(Need urgent help)
    By ekramulhuq in forum Symbian
    Replies: 3
    Last Post: 2006-10-19, 07:09
  5. help me for the grid problems
    By bention in forum Symbian
    Replies: 3
    Last Post: 2006-05-01, 15:34

Posting Permissions

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