11-10-2012 01:07 PM
Hi how to disable backButton in ActionBar?
appActionBar.backButton = new Action( 'Back', null, {id:'back'} );
appActionBar.backButton.enabled = false;
This work when is called before
ab.addChild(appActionBar); this.addElement(ab);
But when I call afer this button stays enabled i even try this:
ab.removeChild(appActionBar); this.removeElement(ab); appActionBar.backButton.enabled = false; ab.addChild(appActionBar); this.addElement(ab);
But no luck.
11-10-2012 02:19 PM
11-10-2012 02:24 PM
Hi thanks, that worked, it's a workaround.
null - removes button like you wrote, but I meed to disable button (action) maybe my code work but i need something to invalidate or render or update action bar
but this is solution for now
11-10-2012 02:55 PM
11-10-2012 06:22 PM
I'm having similar fun with ActionBar.
And I also add/remove the backButton - e.g. since my screen requires an explicit Save...
I chose to enable/disable Actions, rather than adding/removing: I think it would be too confusing to a user when menu items keep changing places. That said, I cannot get the menu items to appear in a consistent order even though I always add them in the same order.
All Actions are explicityly designated as being on the bar or on the overload and I've also tried addActionAt, but the menu items are placed in seeminly random order from one invocation to the next.
Suggestions?
Regards,
11-10-2012 07:02 PM
11-12-2012 01:33 PM
my bad - was loading Actions from a Dictionary...
Regards,
02-19-2013 05:24 PM
Just to confirm. This works now.
appActionBar.backButton.enabled = false;