I'm trying to construct a dialog like control but with somewhat different characteristics. I want the CoeControl to show up without having to put it in it's own view. The problem I have is that I can't make the Sofkkeys to show up. If I draw something it shows up, but not the softkeys. As I understand it, these should be created with CEikButtonGroupContainer. This is what I do in the ConstructL of my CoeControl.
I also have CountComponentControls , ComponentControl and a SizeChanged functions. I have tried many different variations. CEikButtonGroupContainer also has a NewL that takes a WindowGroup as an argument instead of a CoeControl for example. If anyone has used CEikButtonGroupContainer (that is has created and used it) and could give a short explanation, I would very much appreciate it. Maybe the problem isn't with the buttons but has something to do with the relationship between views and coecontrols that I haven't understood.
You've asked a number of questions here, I'll try to answer a few of them. First, there's no problem with using CCoeControl objects without using views. That is one of several architecture 'styles' that can be used, and it's been working well for me for the past few weeks.
If you've implemented CountComponentControls(), ComponentControl() and SizeChanged() then I think you should be fine. I've also called SetContainerWindowL() on the component controls but I think I read that that is redundent if the component controls are returned from the ComponentControl() method.
As for setting your CBA, I had some trouble there as well. Try using the following statements instead:
It works much better now with CEikButtonGroupContainer::Current(), but this interferes with the buttons in the current view. I want this container to interfere as little as possible with the rest of the program.
It should be possible to create a new CEikButtonGroupContainer, but this seems harder than expected. There must be something in the initialization that is missing or plain wrong. The EikDialog class contains a CEikButtonGroupContainer. I guess that what I want to do is something similar to what this class do.
The rest of my application uses the AvkonView framework. If I change the current cba in the popup dialog by changing CEikButtonGroupContainer::Current, the cba of the the current view is affected. That is, when I delete the popup, the soft buttons from the popup remains.
What I wan't to do is popup the dialog and then delete it. When I delete it, the cba of the other views should be unaffected.
An alternative is of course to restore the commandset to what it was before I called SetCommandSetL, but I haven't found a way to get the cba from a CEikButtonGroupContainer and store it. There seems to be no GetCommandSet() function.