×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    168

    Question Show Listbox items in a dialog

    Hi, Can somebody tell me how can i show listbox items in a dialog?? My listbox is of CAknSingleGraphicStyleListBox and i want the exect format in my dialog, i'm not using any file or stream rite now!!

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

    Re: Show Listbox items in a dialog

    Quote Originally Posted by ssabestian
    Can somebody tell me how can i show listbox items in a dialog??
    You can use CAknListQueryDialog, see example here - http://wiki.forum.nokia.com/index.ph...uery_Dialog%3F

  3. #3
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    168

    Re: Show Listbox items in a dialog

    But how would i append my listbox items in that dialog??

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

    Re: Show Listbox items in a dialog

    In this example, as you can see, CDesCArrayFlat array contains listbox items. Just try to check it on practice.

  5. #5
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    168

    Re: Show Listbox items in a dialog

    No what i'm not getting is how to fetch items from the listbox, i'm implementing this code but when i call this method from some other class it gives me a kern exec 3

    CDesCArray* CMrCallGreetings::GreetingNames()
    {
    CTextListBoxModel* model = iGreetings->Model();//Gets the List Box Model
    MDesCArray* textArray = model->ItemTextArray();//returnd Array of Items
    CDesCArray* listBoxItems = static_cast<CDesCArray*>(textArray);

    return listBoxItems;
    }

  6. #6
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    168

    Re: Show Listbox items in a dialog

    Hey A.A.M
    I've implemented this code to show my dialog, can u please tell me how can i fetch the listbox items and append in this dialog??

    void CMrCallActiveMode::SelectGreetings()
    {
    TInt index( 0 );
    CAknSelectionListDialog* dlg= CAknSelectionListDialog::NewL(index,NULL,0);
    dlg->PrepareLC(R_MR_CALL_GREETING_NAME);

    // Create an array of icons, reading them from the file and set them in the dialog
    CArrayPtr< CGulIcon >* iconArray = new ( ELeave )CAknIconArray(1);
    CleanupStack::PushL(iconArray);
    iconArray->AppendL(iEikonEnv->CreateIconL(KMrCallFile,EListBoxMrCallList_iconIndex,EListBoxMrCallMark_iconIndex));
    dlg->SetIconArrayL(iconArray); //transfer ownership to the icons
    CleanupStack::Pop(iconArray);
    (static_cast<CMrCallAppUi*>iAvkonViewAppUi)->ShowTabs(EFalse);
    //(static_cast<CMrCallAppUi*>iAvkonViewAppUi)->GetGreetingsName();
    if(dlg->RunLD())
    {
    //(static_cast<CMrCallAppUi*>iAvkonViewAppUi)->iCallingDifferentTitleForm=1;
    //AppUi()->ActivateLocalViewL(TUid::Uid(EMrCallGreetingsViewId));

    }
    }

Similar Threads

  1. Listbox in dialog gives 'Kern Exec 3' on mobile
    By hansapariya in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-07-24, 07:01
  2. Dialog containing ListBox is not working
    By ghulam.muhammad in forum Symbian
    Replies: 2
    Last Post: 2007-11-01, 10:46
  3. creating selection listbox in multipage dialog
    By meetee in forum Symbian User Interface
    Replies: 10
    Last Post: 2006-08-04, 16:15
  4. Listbox does not redraw inactive items - what is wrong?
    By essoess5705 in forum Symbian User Interface
    Replies: 8
    Last Post: 2006-07-04, 10:04
  5. dialog with listbox
    By synov in forum Symbian User Interface
    Replies: 4
    Last Post: 2004-05-05, 15:35

Posting Permissions

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