×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    26

    listbox in dialog

    hi,

    I'm trying to display a settings listbox in a dialog. I derived CMyDialog from CAknDialog and in the class ConstructL I did the following:


    iListBox = new (ELeave) CAknSettingItemList;
    iListBox->ConstructFromResourceL(R_MY_SETTING_ITEM_LIST);
    iListBox->MakeVisible(ETrue);
    iListBox->SetRect(Rect());
    iListBox->DrawNow();


    however when I execute the dialog, the list does not show up.
    I thought I maybe should move the last three lines to another function that is called after the dialog is displayed. But which one?

    Or could it be that I'm missing sthg here ?

    any ideas would be greatly apreciated
    thx

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    393
    You are missing an ActivateL before the DrawNow(). Look at the Setting list example in the SDK help.

    [N]/Forum Nokia

  3. #3
    Registered User
    Join Date
    May 2003
    Posts
    26
    actually, I did try that but it didn't make a difference

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    24
    Did you put iListbox in the ComponentControl() function and then increment the integer you are returning in your CountComponentControls() function??

    These two function have to be impelemented if you are writing a control with controls nested within it.

    I know its a while since you posted this but it just caught my eye

  5. #5
    Registered User
    Join Date
    Oct 2004
    Posts
    3

    Did you found solution?

    Did you found solution? I have the same problem now. Can you help?

  6. #6
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644
    Hi Guys,

    I am actually in the process of doing an article to be posted on NewLC on exactly this topic.

    If you would be prepared to exchange comments and proof the article (i.e. checking the code etc) I would be more than happy to trade.

  7. #7
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    What topic exactly?

    I believe I've already seen somewhere a very good tutorial how to make Listboxes work...

  8. #8
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644
    Maybe,

    but not settings list boxes which require a different approach.

    There are some notes on this newsgroup on doing it as well

  9. #9
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    Oh yeah. Some tutorial about settings listboxes is always useful..:-)

    Please, let us know when you will publish the article...

    good luck

Posting Permissions

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