Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Please help with containers

2 replies · 1,744 views · Started 13 December 2002

I am writing my first Symbian application, so please bear with me on these questions. I have used the application wizard to create the application framework. I don't quite understand which application architecture I should have chosen, but as of now I have chosen not to use views.

Currently the main screen of my application is blank white space. I would like to add some text to this area and also a logo image. Can someone please tell me how and where I need to do this in the code? I assume this is done in the Container file, but I don't know what I am supposed to do there. Please just get me pointing in the right direction.

Secondly, I currently have two items in the Options menu area. The first one opens a dialog box with some text. The second one I would like to display some preferences options in the main area of the application (i.e. - selection boxes, etc.). So, my second question is this. Once I have the text and image in the main area, how do I hide it and display something else when the item in the menu is selected?

Your help is very much appreciated!

Thanks,

Brian

Hi

About yr first question, U can add your function prototype in the contianer.h and then the function definition in the co�ntainer.cpp then call the function from ui.cpp using a pointer to the container object.......hope it helps....

Hi switchme,

In answer to your first question, you need to add new member variables to the container class, and modify the CountComponentControls(), ComponentControl() and SizeChanged() functions appropriately. I think the app wizard starts you off with a couple of label controls in the container - look at how they're used for an example.

In answer to your second question, probably the best thing to do is to have two "views", one of which displays the settings, one of which the normal display. To get you started on this, try building an app with the "supports view architecture" box checked. Alternatively, you can dynamically add and remove controls from the container.

Try searching on the Symbian or Nokia developer websites for some example code.