form.removeAllCommands() and side menu

58 views
Skip to first unread message

State Thirteen

unread,
Nov 12, 2013, 8:06:11 AM11/12/13
to codenameone...@googlegroups.com
Hi,

I have a side menu navigation and a TitleCommand. 

c1.putClientProperty("TitleCommand", Boolean.TRUE);
f.addCommand(c1);

f.removeAllCommands();

c2.putClientProperty("TitleCommand", Boolean.TRUE);
f.addCommand(c2);

f.revalidate();

After this code I have two commands in the Title. Seems that removeAllCommands() doesn't clear Title commands. 
Should I use any other revalidate() or remove() method for the side menu commands and Title commands?

State Thirteen

unread,
Nov 12, 2013, 8:34:03 AM11/12/13
to codenameone...@googlegroups.com
And another question. If I want Title command to be placed on the left side and side menu on the right how can I do that?
I can place side menu on the right side but don't know how to place Title command on the left side. 

State Thirteen

unread,
Nov 12, 2013, 11:50:46 AM11/12/13
to codenameone...@googlegroups.com
Also I can't find how to change Style for the TitleCommand button in Designer Theme editor. What component should I choose?

Shai Almog

unread,
Nov 12, 2013, 2:24:08 PM11/12/13
to codenameone...@googlegroups.com
That seems to be a bug in the title command side menu.

Check out http://www.codenameone.com/3/post/2013/09/on-the-side-up-on-top.html

TitleCommand uses the UIID TitleCommand.

State Thirteen

unread,
Nov 12, 2013, 2:35:43 PM11/12/13
to codenameone...@googlegroups.com
I can't find TitleCommand in CN Designer theme editor. Can I set it from the code somehow?
And I still don't get how to remove TitleCommand. When side menu opens the command what left after removeAllCommands() is removed normally. I guess there is some method called to revalidate menu with TitleCommand.

Shai Almog

unread,
Nov 13, 2013, 12:36:11 AM11/13/13
to codenameone...@googlegroups.com
Just type it into the area when adding. It is editable.

As I said the problem with removing the title command is a bug, please file an issue: http://code.google.com/p/codenameone/issues/list

State Thirteen

unread,
Nov 13, 2013, 1:02:45 AM11/13/13
to codenameone...@googlegroups.com
Shai,

Thank you. I get it ) 
I have submitted the ticket. 
Reply all
Reply to author
Forward
0 new messages