×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    17

    help! handling LISTBOXES in C++builderX

    hi!

    I'm using C++BuilderX and the 1.2 SDK Microsoft Version. I created a listbox view that i will use as a menu to go to other views. I have added a default handler for that listbox now this piece of code is added to my container file.

    void CNotePasserContainer::OniAknSingleStyleListBox1ControlEvent( CCoeControl * aControl, TCoeEvent aEventType )
    {

    }

    what do i insert in here? i want to change views depending on the listbox item that the user selects. I also have an "open" button that the user can select using the left softkey. Please help me! i'm a newbie and i don't know the possible values of aControl and aEventType and valid commands in this function.

    regards
    pulboron

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    you don't necessarily need to do anything on the function. The commands you could handle in ApUi's handle command function and the middle(in arrows) OK button, you could handle in key event handlers.

    yucca

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    17
    thanks yucca! however, my problem still exists. i have to handle listbox commands. how i am supposed to get the value current selected selected item index on the listbox?

    for example, there is only one command for "open" but the view that will be activated will be based on the selected item in the listbox.

    this means that i have to have a set of IF statements in the handlecommandL for that command, doesn't it? what should i put there?

    as for the keys, what are the values of the keyevent? i i only see the values of the arrow keys in the examples that i've studied. Aren't the arrowkey values TKeyLeftArrow, TKeyRightArrow, etc? what's the value of the ok button?

    thanks for the help!

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    maybe you should check the header file, or SDK documentation for the listbox you are using. By reading the functions provided in the class propably , helps you working on it.

    I think the ok button is EKeyDevice3.

    yucca

  5. #5
    Registered User
    Join Date
    Dec 2004
    Posts
    17
    i understand now. thanks!

    pulboron

Posting Permissions

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