Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2003

    big custom listbox

    i basically want to create a listbox that uses the smallest font available (iEikonEnv->DenseFont()) and occupies the full screen (except for a small CAknSearchField at the bottom) so that i can get as many rows as possible on the screen. it seems like there are many functions to help with this, but they aren't working.

    there are 3 things i want to do:


    i am able to use the small font, but the listbox items are still the same height as before (so i cannont cram any more rows into the space that i available, even though each item has a large margin above and below it, since the font is much smaller), even after i use CAknSingleStyleListBox::SetItemHeightL() or CListBoxView::SetItemHeight().

    Is there something else i need to do?


    The second thing is that i want the listbox to cover the entire screen, so that it covers up the title pane, how can i do that?
    iListBox->SetExtentToWholeScreen() didn't work for me. my app is in the standard view arhitecture (app, document, appui, and 1 container with my listbox and search field as the only 2 component controls within that container).


    i would like to make the CAknSearchField as small as possible, currently it takes up too much room. do i just derive from that class and reimplement the Draw() function??

    thanks in advance for your help.

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Czech Republic
    SetItemHeightL() really should do the trick...

    if you want to cover whole screen you must give the container the right Rect... so during construction (and in HandleClientRectChange() method) use ApplicationRect() instead of ClientRect()....
    Use one of these:

    iContainer->ConstructL( ClientRect() );

    TRect rect(0,0,176,208);
    iContainer->ConstructL( rect );

    iContainer->ConstructL( ApplicationRect() );

  3. #3
    Registered User
    Join Date
    Jul 2005

    Re: big custom listbox


    Knowing this is very old topic but i am still posting my reply in it. I am somehow been able to draw list item in small size using SetItemHeightL(). But i am not been able to resize (in small size) the text in the list items.

    Can anyone from you have a bit of idea??

  4. #4
    Registered User
    Join Date
    Dec 2005

    Re: big custom listbox

    Hi, how did you manage in using SetItemHeightL() ?
    I tried but with no results.
    Hope you can give some advice.
    Thanks, Dario

  5. #5
    Registered User
    Join Date
    Jul 2005

    Re: big custom listbox

    Hi say2paul....

    You said in one of your posts that you were able to decrease the font using SetItemHeightL() and then cram in more entries on the screen....
    Can you please share your ideas as to how you went about it? I too am trying to do the same but couldn't get through.
    Thanks in advance....

Posting Permissions

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