BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-12-2007, 03:34 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 Tree problem?!?

Please Login to Remove!

I want to make a tree and i need to put in its nodes not a String object as usual but i want to put a CheckboxField object. Is it possible? Can I catch a trackwhell click event to the nodes of that kind of tree?
Offline  
Old 11-14-2007, 11:31 AM   #2 (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

I solved my problems, but i have one more question. Does someone know how can i get rid of the context menu which is invoked when the trackwheel is clicked. This context menu of the tree is to open a parent node (root). I want to open it when the trackwheel is clicked. I used a code like this but i to simulate the trackwheel is clicked.
Code:
protected boolean trackwheelClick(int status, int time) {
    int node = tree.getCurrentNode();
    int id = tree.getParent(node);
    if (id == 0) {
      ContextMenu contextMenu = tree.getContextMenu();
      MenuItem item = contextMenu.getItems() [0];
      item.run();
      return true;
    }
    TreeNode cBox = (TreeNode) tree.getCookie(node);
    if (!cBox.isClicked()) {
      cBox.setClicked(true);
    } else {
      cBox.setClicked(false);
    }
    return true;
  }
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

MSA Altair+ Single-Gas Detector For Hydrogen Sulfide (H2S)
$89.99
MSA Altair+ Single-Gas Detector For Hydrogen Sulfide (H2S) pictureMSA 10107602 ALTAIR® 4X Multi-Gas Detector – LEL, O2, CO, H2S
$220.0
MSA 10107602 ALTAIR® 4X Multi-Gas Detector – LEL, O2, CO, H2S  picturePROFESSIONAL TOOLS: ALTAIR 4 – FOUR GAS MULTIGAS DETECTOR – MSA
$355.0
PROFESSIONAL TOOLS: ALTAIR 4 – FOUR GAS MULTIGAS DETECTOR – MSA    picture3 X MSA Altair 4 X Multi gas Monitor Detectors Meter H2S,LEL,CO,O2
$800.0
3 X MSA Altair 4 X Multi gas Monitor Detectors Meter H2S,LEL,CO,O2 pictureMsa Monitors / 3 X MSA Altair 4 X Multi gas Monitor Detector Meter H2S,LEL,CO,O2
$800.0
Msa Monitors / 3 X MSA Altair 4 X Multi gas Monitor Detector Meter H2S,LEL,CO,O2 picture






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