×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    159

    Setting list-row height

    Hello,

    Does anybody knows how to set the height of rows in a list (CAknColumnListBox)? Even though I've managed to reduce font size, the height of the rows has remained the same.

    Thanks,
    Nadav

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: Setting list-row height

    Hi,

    listbox base class CEikListBox has a View() method, which returns the pointer to the CListBoxView class, try to call

    CEikListBox::View()::SetItemHeight().

    Anyway if you need to set such listbox properties like font, item height, etc. it's usually better do make your own listbox...

    BR
    STeN

  3. #3
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    159

    Re: Setting list-row height

    Thanks Sten, accurate reply as always :).

    Regarding your suggestion to create my own list:

    1. Why is it better? which things are easier to do with my own class?
    2. Which class should I inherit? I can inherit CAknColumnListBox, but it seems to be more standard to follow the generic examples, and inherit from CEikColumnListBoxTypedef, or something of the sort (like CAknSingleStyleListBox does, for example).


    Thanks,
    Nadav

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: Setting list-row height

    Hi,

    why it is better? Once you have own listbox - you are controlling the appearance on your own - while the fact you are deriving from the Symbian classes means, that the framework cares of starndard behavior. Having own listbox classes you can do anything you want, without checking, which listbox you have to use, how to format the model strings, where the icon will be displayed, etc...

    Derive the model from MListBoxModel
    Derive the drawer from CListItemDrawer
    Derive the listbox from CEikListBox

    I found this way very comfortable.
    BR
    STeN

  5. #5
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    159

    Re: Setting list-row height

    Since I am a beginner to Symbian, I think it might be a little too complicated for me to actually draw the cells myself (I need the time for developing other stuff). So I will probably stick to the generic column lists at the moment. In the future, I might change that to further customize my view.

    I think Symbian generic support for column tables should be flexible enough to accommodate some standard needs (such as deciding the background color, the type of margins between cells, displaying a header line, etc.). I don't know if this is currently the case or not. I hope it is...

    Thanks you again,
    Nadav

Similar Threads

  1. Two-line setting & Multi-selection list setting items
    By azavor in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-06-04, 19:39
  2. CAknSettingItemList setting list instead of setting page
    By huami in forum Symbian User Interface
    Replies: 0
    Last Post: 2007-10-28, 19:30
  3. Partly dynamically setting list problem
    By kaiten-sushi in forum Symbian User Interface
    Replies: 3
    Last Post: 2007-05-09, 16:22
  4. Setting Height for list box items
    By krnsoft in forum Symbian User Interface
    Replies: 2
    Last Post: 2007-04-09, 13:53
  5. Setting list and setting page appearance
    By Norrit_ in forum Symbian User Interface
    Replies: 7
    Last Post: 2006-07-31, 13:29

Posting Permissions

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