S60 UI Designer - working with menus
This post gives a quick overview of the menu editor, including attaching your own code to run when the menu items are chosen.
An Options menu is set up for you when you use Avkon view switching and use the CCoeControl or Setting Items List container. Avkon view switching is enabled by default, so unless you turn it off you don’t need to worry about it. A menu isn’t set up for Forms because they use a predefined menu which can only be customized via code.
When you edit a menu you’re really editing a hierachy of MENU_BAR, MENU_TITLE, MENU_PANE, and MENU_ITEM Symban resources. In the designer these are encapsulated within the ‘optionsMenu’ component instance shown in the non-layout area of the designer.
To start editing just click on the optionsMenu. A graphical representation overlays the layout area. Start typing to entering the first command. Press Enter to complete it, and repeat to add additional items.
To edit sub-menus use the arrow keys or mouse to select an existing item, and then edit the “Type here” entry.
Some editing operations are easier use a structural representation of the menu objects. For that you can use the Outline view. Items can be dragged around, deleted from here. The select item can be edited in the Properties view.
Menu commands are connected to code using Events. The Events view shows all the events for the selected item. Menu items have a single event, called ’selected’, which occurs when the user selects the menu item.
Double-click on the event, or select and press Enter. The designer will update your source code and navigate to the generated event handler code. Here’s where you put your application logic.



i want to attached my own code here..but what kind of coding that i need to use to run when the menu items are chosen..? i tried to put the C++ coding (using that ‘cout’ and ‘cin’ and so on..)but it seems there are some error occurs.. did they use the other terms to do the coding? i really don’t know what to do.. please someone help me..
i want to attached my own code here..but what kind of coding that i need to use to run when the menu items are chosen..? i tried to put the C++ coding (using that ‘cout’ and ‘cin’ and so on..)but it seems there are some error occurs.. did they use the other terms to do the coding? i really don’t know what to do.. please someone help me..