×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    7

    listbox problem: Items from txt-file

    I want to make a listbox that uses txt-files to store the data. Does anyone have a good example or piece of code?

    Thanks&Regards
    C64

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: listbox problem: Items from txt-file

    If you already know how to create a listbox, you may find TFileText useful.

  3. #3
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Brebes, Indonesia
    Posts
    129

    Re: listbox problem: Items from txt-file

    How to create a list box ?

    i have resource like this
    ----------------------------------
    RESOURCE DIALOG r_opponentform_form_dialog
    {
    flags = EEikDialogFlagNoDrag |
    EEikDialogFlagFillAppClientRect |
    EEikDialogFlagNoTitleBar |
    EEikDialogFlagWait;
    buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
    form = r_opponentform_form;
    }


    // ---------------------------------------------------------
    // r_opponentform_form
    // The form
    //
    // ---------------------------------------------------------
    //
    RESOURCE FORM r_opponentform_form
    {
    //flags = EEikFormEditModeOnly;
    items =
    {

    DLG_LINE
    {
    type=EEikCtEdwin;
    prompt=NAME_TEXT;
    id=EApplicationStatus;
    control=EDWIN
    {
    width=10;
    maxlength=10;
    };
    }
    };
    }
    ---------------------------------------------------

    I want to display list in my AppContainer while application loaded.
    My ConstrulL method in AppContainer is
    ---------------------------------------------------
    void CWAPServContainerApplication::ConstructL(const TRect& aRect)
    {
    iTimeWaster.CreateLocal();
    CreateWindowL();

    iOpponentsList = new (ELeave) CAknSingleHeadingStyleListBox;
    iOpponentsList->SetContainerWindowL(*this);

    // Second Phase Construction
    TResourceReader reader;
    CEikonEnv::Static()->CreateResourceReaderLC(reader, R_WAPSERV_STATUS_DIALOG);
    iOpponentsList->ConstructFromResourceL(reader);
    CleanupStack::PopAndDestroy(); // reader

    iOpponentsList->CreateScrollBarFrameL(ETrue);
    iOpponentsList->ScrollBarFrame()->SetScrollBarVisibilityL(
    CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);

    SetRect(aRect);
    ActivateL();
    }
    ---------------------------------------------------
    but my app panic

    please help me

  4. #4
    Super Contributor
    Join Date
    Oct 2005
    Location
    Hyderabad,India
    Posts
    1,156

    Re: listbox problem: Items from txt-file

    Hi all,
    Look out in this thread that deals with the same

    http://discussion.forum.nokia.com/fo...ad.php?t=77730

    Br,
    Priju

Similar Threads

  1. Replies: 7
    Last Post: 2006-11-03, 01:52
  2. Compile problem on Create dynamically a listbox
    By aferrario in forum Symbian
    Replies: 1
    Last Post: 2006-07-19, 04:45
  3. series 80 ListBox problem
    By jokerbirot in forum Symbian
    Replies: 1
    Last Post: 2005-06-29, 15:22
  4. Problem: Indexes of CDesCArray set to the Listbox.
    By digitaltejas in forum Symbian
    Replies: 2
    Last Post: 2004-08-10, 08:10
  5. ListBox and resource file
    By tplinet in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-04-02, 16:12

Posting Permissions

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