×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Jan 2008
    Posts
    272

    Thumbs up my new requirement

    Hi friends,

    I have a requirement:

    1. A list will be displayed.
    list contains elements as:
    A,
    B,
    C,
    and so on...
    list has two commands: open and exit.

    when the user selects element 'A' and clicks on "open" command, a new text box will be displayed showing "you pressed A". This text box has "Back" command. When the user presses the "Back", the list will be displayed.

    In the same way for all list elements, the new text box will be displayed, and when "Back" command is pressed the main list will be displayed.

    Can any one please tell me how can I do this?
    if possible, provide me some source code.

    Thanks,
    Manoj.

  2. #2
    Super Contributor
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889

    Re: my new requirement

    I would do like this...

    1. Create a listbox container with the listbox containing A,B,C...

    2. Create a view with this list box container and set the menu options in the resource file as R_AVKON_SOFTKEYS_OPTIONS_BACK..which will have the options and back key..

    3. Now handle the Options and back key in you view by HandleCommandL()...

    When Options is pressed u can Show an CAknInformation note with the index selected for the list box...

  3. #3
    Super Contributor
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889

    Re: my new requirement

    Otherwise you cud juz have a single listbox container view and didplay a Dialog/Note which itself has a cancel option i m nt sure...which one of them
    You can handle this in HandleListBoxEventL()...

  4. #4
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: my new requirement

    Also serch in wiki with keywords listbox . u will find some supporting artcles like this
    http://wiki.forum.nokia.com/index.ph...t_from_ListBox

    The above article is not exactly what u need but helps to find the current item pos and name in a list box. Then just use that index in ur offerkeyeventL or handlecommandL ......Here u can display a dialog or textbox.... what ever ur req..


    Thanks

  5. #5
    Regular Contributor
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    204

    Re: my new requirement

    Hi,

    1. Create list box items.
    2. On selection event, get the listbox index.
    3. Then with index you can get the list box text also.
    4. Run an dialog which suites you with the text extracted from list box.

    The methods below will help you to get listbox index and text.
    Hope this might be help full.

    TPtrC xyz::GetListBoxText()
    {
    TPtrC itemtext = iListBox->Model()->ItemText (GetListBoxIndex ());
    return itemtext;
    }

    TInt xyz::GetListBoxIndex()
    {
    TInt index = iListBox->CurrentItemIndex ();
    LOGARG ("index in getlistboxindex:%d", index);
    return index;
    }

    Regards,
    Srivatsan

  6. #6
    Regular Contributor
    Join Date
    Jan 2008
    Posts
    272

    Re: my new requirement

    Hi,

    I am new to Symbian C++. can any body provide me the complete code.

    Thanks,
    Manoj.

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,570

    Re: my new requirement

    You can find listbox examples everywhere. Mine is in #3 of http://discussion.forum.nokia.com/fo...ad.php?t=92554
    Add it to some generated code skeleton. Such generated codes usually already contain AppUi::HandleCommandL, which is responsible for handling menu commands (and the menu itself is declared in the .rss file).

Similar Threads

  1. Nokia LD-3W documentation requirement
    By maciekj in forum Feedback - Nokia Developer Services & Infrastructure
    Replies: 6
    Last Post: 2007-11-13, 08:19
  2. OTA Setting: Disable PIN Requirement
    By franco_m in forum VoIP
    Replies: 8
    Last Post: 2007-04-27, 14:53
  3. phone requirement
    By know_asim in forum Mobile Java General
    Replies: 0
    Last Post: 2005-08-04, 15:44
  4. Replies: 0
    Last Post: 2005-07-13, 12:42
  5. Location API requirement??
    By tedinroc in forum Mobile Java General
    Replies: 1
    Last Post: 2004-09-06, 05:17

Posting Permissions

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