×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    54

    Right to left custom grid

    Hi,

    I'm using a custom grid, but when I set layout with right to left, problems occur:
    1. The cells are drawn left aligned
    2. Cells order is corrupted, the cell of the 1st index in a row draws the last cell in that row

    Any suggestions?

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

    Re: Right to left custom grid

    IMHO, you need to handle a layout changes and redraw your custom grid.

  3. #3
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    54

    Re: Right to left custom grid

    Still don't know. How?
    I'm using the below code to change grid layout:
    // Set grid layout, and scrolling
    control->SetLayoutL(EFalse, KLeftToRight, ETrue,
    KNumOfItemsInPrimaryOrient, KNumOfItemsInSecondaryOrient, cellSize,
    KWidthOfSpaceBetweenItems, KHeightOfSpaceBetweenItems);
    control->SetPrimaryScrollingType(CAknGridView::EScrollFollowsItemsAndLoops);
    control->SetSecondaryScrollingType(
    CAknGridView::EScrollIncrementLineAndLoops);

    and then I call SetupGrid() and it is implemented as follows:
    // Setup text foreground and background colours to default
    AknListBoxLayouts::SetupStandardGrid(*this);
    // Set up graphics subcells
    AknListBoxLayouts::SetupFormGfxCell(...
    // Set up text subcells
    AknListBoxLayouts::SetupFormTextCell(...

    And the grid works fine when phone languge is English.

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

    Re: Right to left custom grid

    Try to set second SetLayoutL()'s parameter as EFalse (means right to left).

    Also note that "the S60 platform also provides flag EAknGridLanguageSpecificHorizontalDirection to provide horizontal ordering based on the language's writing direction". See - Grids API: Using Grids API

  5. #5
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    54

    Re: Right to left custom grid

    Here's my grid resource:
    GRID
    {
    flags = EAknListBoxSelectionGrid;
    style = r_grid_style;
    };
    RESOURCE GRID_STYLE r_grid_style
    {
    layoutflags = EAknGridHorizontalOrientation| EAknGridLanguageSpecificHorizontalDirection | EAknGridTopToBottom;
    // horizontal scroll
    primaryscroll = EAknGridFollowsItemsAndLoops;
    // vertical scroll
    secondaryscroll = EAknGridFollowsItemsAndLoops;
    // number of items horizontally per screen
    itemsinprimaryorient = 4;
    // number of items vertically per screen
    itemsinsecondaryorient = 3;
    gapwidth = 5;
    gapheight = 5;
    height = 42;
    width = 24;
    }

    And still have the same problem.

Similar Threads

  1. scrollbar with the grid
    By agirllikeyou in forum Symbian User Interface
    Replies: 9
    Last Post: 2010-02-05, 09:46
  2. Replies: 1
    Last Post: 2009-05-16, 10:30
  3. Replies: 4
    Last Post: 2009-02-21, 08:09
  4. Custom Grid Control
    By aditighosal in forum Symbian
    Replies: 2
    Last Post: 2008-03-18, 09:16
  5. Custom Grid
    By praveena_R in forum Symbian User Interface
    Replies: 7
    Last Post: 2007-11-06, 06:18

Posting Permissions

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