I've created a basic Symbian C++ application for S60 3rd MR. My eventual goal is to have an application with two tabs, one of which displays some small bitmaps and descriptive text, and another of which is basically a debug console with a lot of scrollable (no real need to edit, but like the possibility) text.
I'm trying to incorporate tabs from an example I found in the Wiki:
For each of my tabs I'm using an editor also from an example in the wiki:
My application starts and both tabs are visible (call them T1 and T2). I modified the editors to include some default content so they don't start blank. However, T1's editor shows only a fraction of the first letter of the editor's contents. Typing on the phone has no effect. If I switch tabs (implemented via detecting left and right arrow presses), T2 shows up similarly, with only part of its first letter visible. However, if I start to type on T2, suddenly the pre-existing content appears fully, and I can type and edit text as expected.
When I switch back to T1, the contents of T2 are still visible, but I cannot make changes to them.
I have done a fair amount of printf()-based debugging (I'm cheating a little and have a CEikConsoleScreen positioned over top of the app's title, so I can call Printf on it), and I believe I'm correctly handling the keypress events.
I think the problem is probably related to not correctly specifying what Editor / Tab object is "on top" at any given time.
Do I need to call something like AddViewL(), AddToStackL(), etc?
// construct iFirstControl & iSecondControl in here..
_LIT(Ked1, "Editor 1");
iFirstControl = new (ELeave) CEditorContainer;
_LIT(Ked2, "Editor 2");
iSecondControl = new (ELeave) CEditorContainer;
When a keypress happens, in CTabsContainer::OfferKeyEventL():
I feel like this is inadequate, since nothing tells any of the CEditorContainer's to do anything.
//SetMenuL(); // Commented out by me
Advice is very much appreciated!