×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Jun 2007
    Location
    Jakarta, Indonesia
    Posts
    269

    How to change number of row showed inside a list box?

    Hi FN


    I want to show only 3 rows of list (in a 240x320 resolution) because I need to save some space for other controls.

    The standard CEikFormattedCellListBox shows 4 rows in that resolution.

    Does anyone know how to do it?

  2. #2
    Registered User
    Join Date
    May 2007
    Location
    Poland
    Posts
    606

    Re: How to change number of row showed inside a list box?

    hello,
    i guess you have got in LayoutControls() something like:
    Code:
    iListBox->SetExtent(TPoint( 0, 0), iListBox->MinimumSize() );
    i would make some condition there if you want less number of rows

    good luck

  3. #3
    Regular Contributor
    Join Date
    Jun 2007
    Location
    Jakarta, Indonesia
    Posts
    269

    Re: How to change number of row showed inside a list box?

    hmm found it

    thanks

  4. #4
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: How to change number of row showed inside a list box?

    Hi,

    You could do it while defining the listbox itself

    Defining a listbox in resource file
    Listbox resources are described with the LISTBOX structure, as defined in the eikon.rh file.

    STRUCT LISTBOX
    {
    BYTE version; // version number
    WORD flags; // listbox flags
    WORD height; // in items
    WORD width; // in chars
    LLINK array_id; // points to items in ARRAY structure
    }

    STRUCT ARRAY
    {
    STRUCT items[]; // list items
    }

    There the height is meant for the items you can also follow this link
    Regards,
    Sriky

  5. #5
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: How to change number of row showed inside a list box?

    You could also set the item size using


    TSize size = Rect().Size();
    size.iHeight /= 4; // You want 4 items in the resolution

    iMyListBox->ItemDrawer()->SetItemCellSize( size );
    Regards,
    Sriky

Similar Threads

  1. List box
    By remesh in forum Symbian User Interface
    Replies: 2
    Last Post: 2010-12-21, 11:13
  2. Switching list view to Grid view for list box UIQ
    By brajabasi in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-04-14, 07:30
  3. cutom list box to popup list??
    By harish13_ks in forum Symbian
    Replies: 5
    Last Post: 2007-10-06, 12:06
  4. Series 60: Changing the font in a list box
    By MentalBlank in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-10-01, 08:33
  5. List Box control on series -60
    By Nokia_Archive in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-05-30, 21:03

Posting Permissions

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