Re: Hide/ Un-Hide CBA Button
may be you need to use :
cba->MakeVisible( ETrue );
cba->DrawDeferred or cba->DrawNow
Re: Hide/ Un-Hide CBA Button
[QUOTE=vineet.jain;820446]may be you need to use :
cba->MakeVisible( ETrue );
cba->DrawDeferred or cba->DrawNow[/QUOTE]
I tried that and getting [B]Kern_exec 3[/B]
[CODE]
CEikButtonGroupContainer* myCba = CEikButtonGroupContainer::Current();
CleanupStack::PushL( myCba );
myCba->SetCommandSetL( R_CUSTOM_CBA1 );
myCba->MakeVisible( ETrue );
myCba->DrawDeferred();
CleanupStack::Pop(); // myCba
[/CODE]
Re: Hide/ Un-Hide CBA Button
One way is to get CBA buttons through the CAknAppUi::Cba() function and then call CEikButtonGroupContainer's MakeVisible() .
Another way is to create a full-screen application, like described here [url]http://wiki.forum.nokia.com/index.php/How_to_make_a_full-screen_application_using_Symbian_C%2B%2B[/url] and here [url]http://wiki.forum.nokia.com/index.php/Full-screen_mode_on_touch_UI[/url] And change from full-screen mode to a windowed one when you need it.
Re: Hide/ Un-Hide CBA Button
[QUOTE=axsm;820450]One way is to get CBA buttons through the CAknAppUi::Cba() function and then call CEikButtonGroupContainer's MakeVisible() .
Another way is to create a full-screen application, like described here [url]http://wiki.forum.nokia.com/index.php/How_to_make_a_full-screen_application_using_Symbian_C%2B%2B[/url] and here [url]http://wiki.forum.nokia.com/index.php/Full-screen_mode_on_touch_UI[/url] And change from full-screen mode to a windowed one when you need it.[/QUOTE]
I am trying to hide the softkey while loading the app, and it worked perfect
I did this way
[B]appui.cpp[/B]
[CODE]
ConstructL()
{
...
Cba()->MakeVisible(EFalse);
...
[/CODE]
When I try to display the softkey in run time , i called the function , but nothing happens. I can't see the softkey, no responce at all.
[B]appui.cpp[/B]
[CODE]
ChangeOrientation()
{
Cba()->MakeVisible(ETrue);
}
[/CODE]
could you please help me to enable the hidden softkey?
Please suggest me.
Re: Hide/ Un-Hide CBA Button
Well, if you still prefer a CBA-based solution, try the following:
#include <avkon.rsg> // include this to use R_AVKON_SOFTKEYS_EMPTY
#include <eikbtgpc.h>
...
// Disable CBA buttons
CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current(); // or CAknAppUi::Cba()
if ( cba != NULL )
{
cba->SetCommandSetL( R_AVKON_SOFTKEYS_EMPTY );
cba->DrawNow();
}
Re: Hide/ Un-Hide CBA Button
[QUOTE=axsm;820463]Well, if you still prefer a CBA-based solution, try the following:
#include <avkon.rsg> // include this to use R_AVKON_SOFTKEYS_EMPTY
#include <eikbtgpc.h>
...
// Disable CBA buttons
CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current(); // or CAknAppUi::Cba()
if ( cba != NULL )
{
cba->SetCommandSetL( R_AVKON_SOFTKEYS_EMPTY );
cba->DrawNow();
}[/QUOTE]
I can disable teh cba button but after disabling if I want to enable its not working, I need to enable the disabled cba button
Re: Hide/ Un-Hide CBA Button
[QUOTE=somnathbanik;820467]I can disable teh cba button but after disabling if I want to enable its not working, I need to enable the disabled cba button[/QUOTE]
I guess in this case the sequence of steps will be just the same, except that you'll be using your own softkey resource:
if ( enableButtons )
{
cba->SetCommandSetL( R_YOUR_APPLICATION_CBA_BUTTONS_SET );
cba->DrawNow();
}
else
{
cba->SetCommandSetL( R_AVKON_SOFTKEYS_EMPTY );
cba->DrawNow();
}
Re: Hide/ Un-Hide CBA Button
[QUOTE=axsm;820471]I guess in this case the sequence of steps will be just the same, except that you'll be using your own softkey resource:
if ( enableButtons )
{
cba->SetCommandSetL( R_YOUR_APPLICATION_CBA_BUTTONS_SET );
cba->DrawNow();
}
else
{
cba->SetCommandSetL( R_AVKON_SOFTKEYS_EMPTY );
cba->DrawNow();
}[/QUOTE]
I tried this way
[B]Appui.cpp[/B]
[CODE]
Constl()
{
...
CEikButtonGroupContainer* cba = CAknAppUi::Cba();
if ( cba != NULL )
{
cba->SetCommandSetL( R_AVKON_SOFTKEYS_EMPTY );
cba->MakeVisible( EFalse );
cba->DrawNow();
}
...
[/CODE]
the above code helps me to display the app in full screen when it starts. Now at a sertain point of time when the app is running I want to display the menu bar. do I did in this way
[CODE]
void CMusicalAlarmAppUi::ShowMenuBar()
{
CEikButtonGroupContainer* cba = CAknAppUi::Cba();
if ( cba != NULL )
{
cba->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_EXIT );
cba->MakeVisible( ETrue );
cba->DrawNow();
}
}
[/CODE]
but not able to display the menu bar.
Any one please suggest me. I am trying this for a long time.
Re: Hide/ Un-Hide CBA Button
May be you might have to put the code for a particular view to hide/un-hide its cba keys, try like this:
CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
if (cba != NULL) {
cba->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_EXIT );
cba->MakeVisible( ETrue );
cba->DrawDeferred();
}
put the above code in some function in the view class in which you want to un-hide the cba keys.
Re: Hide/ Un-Hide CBA Button
[QUOTE=vineet.jain;828582]May be you might have to put the code for a particular view to hide/un-hide its cba keys, try like this:
CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
if (cba != NULL) {
cba->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_EXIT );
cba->MakeVisible( ETrue );
cba->DrawDeferred();
}
put the above code in some function in the view class in which you want to un-hide the cba keys.[/QUOTE]
I don't know why its not working for me. even I create a function in my view class and paste the code there. Any way i did rather differently
First i set [B]SetExtentToWholeScreen();[/B] to make the full screen and at a particular point I call this function below
[CODE]
void CMusicalAlarmContainer::SetWindow()
{
TRect aRect;
SetRect(TRect(TPoint(0,0),TPoint(360,580)));
// SetRect(aRect);
ActivateL();
}
[/CODE]
This way i could make it done. I would like to know is this a write process , I am targeting 5th edition and S^3 device
Re: Hide/ Un-Hide CBA Button
use
/*
Make it visible at first as others suggested
*/
cba->drawableWindow()->setOrdinalPosition(0);
cba->drawnow();