BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-10-2007, 07:29 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: Bulgaria
Model: none
PIN: N/A
Carrier: Mtel
Posts: 150
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Make Custom Context Menu?

Please Login to Remove!

I would like to make a custom context menu and my problem is with the separator. I use this code:

Code:
protected void makeContextMenu(ContextMenu contextMenu) {
    contextMenu.addItem(feedListScreen);
    contextMenu.addSeparatorInternal();
    contextMenu.addItem(syncScreen);
    contextMenu.addItem(toolsScreen);
    contextMenu.addItem(helpScreen);
  }
I have only a method AddSeparatorInternal(); and it puts the Separator at the bottom of the ContextMenu i.e. above the helpScreen MenuItem object but I would like to put it between feedListScreen MenuItem object and syncScreen MenuItem object. Do u know how? I don't have a method addSeparator() it is only available for Menu class.Thank U!
Offline  
Old 09-11-2007, 02:47 PM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Posts: 237
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

use static method MenuItem.separator(int ordinal):
Code:
protected void makeContextMenu(ContextMenu contextMenu) {
    contextMenu.addItem(feedListScreen);
    contextMenu.addItem(MenuItem.separator(10)); // actual value depends on ordinal of other menuitems
    contextMenu.addItem(syncScreen);
    contextMenu.addItem(toolsScreen);
    contextMenu.addItem(helpScreen);
  }
Offline  
Old 09-12-2007, 01:39 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: Bulgaria
Model: none
PIN: N/A
Carrier: Mtel
Posts: 150
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, I found out the way. I just should look the JDE library more carefully. Thank you!
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

100uF 400V 22x32mm Electrolytic Snap in Capacitor: 2pcs per lot
$6.99
100uF 400V 22x32mm Electrolytic Snap in Capacitor: 2pcs per lot picture2.2uF 315V 105ºC Electrolytic Radial Capacitor, UPR2F2R2MPH1TD : 10pcs per lot
$5.99
2.2uF 315V 105ºC Electrolytic Radial Capacitor, UPR2F2R2MPH1TD : 10pcs per lot picture2700uF 35V, 105°C, 22x30mm, Electrolytic Snap in Capacitor : 2pcs per lot
$6.99
2700uF 35V, 105°C, 22x30mm, Electrolytic Snap in Capacitor : 2pcs per lot picture10000uF 35V, 105°C, 30x40mm, Electrolytic Snap in Capacitor : 2pcs per lot
$6.99
10000uF 35V, 105°C, 30x40mm, Electrolytic Snap in Capacitor : 2pcs per lot pictureTrimmer Capacitor : 7pF to 35pF Ceramic : Variable Trim Cap : 5pcs per lot
$5.99
Trimmer Capacitor : 7pF to 35pF Ceramic : Variable Trim Cap : 5pcs per lot picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.