Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
ted_hulick
Posts: 229
Registered: ‎11-21-2009
My Device: Not Specified
Accepted Solution

Menu Separator in ApplicationMenuItem ?

How the heck does a person put a menu separator in an Application Menu?

 

I see no API for this?

Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Menu Separator in ApplicationMenuItem ?

you can't.

 

I beleive the system will place separators in for large breaks in the ordinal values.

 

For example,

 

100000

100100

100200

<--------------  system would put a break here

200000

 

Don't take my word for this, I'm going by memory - you'll have to test it out.

 

 

Developer
jMarc
Posts: 94
Registered: ‎10-01-2009
My Device: Not Specified

Re: Menu Separator in ApplicationMenuItem ?

Go ahead and take his word for it.  From the Javadocs for the MenuItem class:

"Each item has an ordinal specifying the sort order within the menu. A separator will be automatically inserted between adjacent items whose ordinals differ by at least 0x00010000."

 

Works for ApplicationMenuItem, too, although it doesn't say so.

 

This is one of those subjects that has come up before, but is hard to search for.

Developer
ted_hulick
Posts: 229
Registered: ‎11-21-2009
My Device: Not Specified

Re: Menu Separator in ApplicationMenuItem ?

I really thank you both...

 

It just seems like this kind of info should be in the javadoc or perhaps they could have added a addSeparator()?

 

Will give this a try...