A checkbox tree control
Hi All,
I need to create a checkbox tree control to show the user and make him select the directory listing of application-home on the server side. I have a solution wherein I have to submit the page every time the checkbox is clicked, but that is not efficient.
I need to select all the child node checkboxes once the parent checkbox is selected and well I need to show the parent checkbox greyed if even one child is not selected and show the parent deselected if all child nodes are unclicked.
Please Help...
Thanks
Ultimate.
U can handle all these by JavaScript. there's no time to sit and write code fer u, just try to show the way!
do some search on huge set of javascript codes/sample on net to handle those things.
--Behrad
Similar Messages
-
Does anybody has an idea where I find an example for a checkbox Tree? Thx
There is no Checkbox Tree control in JavaFX (as of now). I've written one long time back in Java. You could adopt it to use in JavaFX as a swing component.
[http://winstonprakash.com/sources/java2html/tree/JCheckBoxTree.java.html]
[http://winstonprakash.com/sources/java2html/tree/JCheckBoxTreeTester.java.html|http://winstonprakash.com/sources/java2html/tree/JCheckBoxTree.java.html] -
I found that the oracle installation is using tree control with check box. I tried to use the same feature in my application. But I found that the tree control in swing and infoswing is not having the feature to add checkbox in the tree control. If anybody knows how to add checkbox in the tree control using the jdeveloper please help me.
You can see how to do it the next link http://www2.gol.com/users/tame/swing/examples/JTreeExamples2.html
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by S. Arun ([email protected]):
I found that the oracle installation is using tree control with check box. I tried to use the same feature in my application. But I found that the tree control in swing and infoswing is not having the feature to add checkbox in the tree control. If anybody knows how to add checkbox in the tree control using the jdeveloper please help me.<HR></BLOCKQUOTE>
null -
Numeric cell in Tree control ?
Hi y'all !
I'd like to have numeric input cells in my TREE CONTROL. I can see the types string, ring, combo box, etc. ... but NUMERIC is not included.
I'm using CVI 2012.
Is there an alternative or does anyone know at least why it is not supported ?
Thanks!Hi carolynturnell,
Indeed cell types included in a tree control are String,Ring, ComboBox, CheckBox, ColorPicker and HorizontalBar.
Tree controls are used to view a hierarchical list of items.
Why do you want to display Numeric/use tree control ?
Valentin
Certified TestStand Architect
Certified LabVIEW Developer
National Instruments France
#adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
Travaux Pratiques d'initiation à LabVIEW et à la mesure
Du 2 au 23 octobre, partout en France -
Hi All,
I have a need for a tree control which supports having a
combobox. I've done extensive research on Google, but came up
empty. If anyone has or can point me to any examples, it would be
greatly appreciated.
Thanks in advance!
-jfHere's a follow-up to my first question.
I found an example of a tree with checkboxes and set out to
modify it so that it would fit my needs. I'm really stumped here,
because it will render a checkbox or radio button fine, but I can't
get it to render a combobox or button. I'd also like the combobox
and button to be on the right side of the parent/child label, is
that possible?
Any help anyone can provide is greatly appreciated.
Content of ComboBoxTreeRenderer:
package util
import mx.controls.Image;
import mx.controls.Tree;
import mx.controls.treeClasses.*;
import mx.collections.*;
import mx.controls.ComboBox;
import mx.controls.Button;
import mx.controls.RadioButton;
import mx.controls.listClasses.*;
import flash.events.Event;
import flash.events.MouseEvent;
import mx.events.FlexEvent;
import flash.display.DisplayObject;
import flash.events.MouseEvent;
import flash.xml.*;
import mx.core.IDataRenderer;
public class ComboBoxTreeRenderer extends TreeItemRenderer
protected var myImage:Image;
// set image properties
protected var myComboBox:ComboBox;
protected var myRadioButton:RadioButton;
protected var myButton:Button;
public function ComboBoxTreeRenderer ()
super();
mouseEnabled = false;
override protected function createChildren():void
super.createChildren();
myRadioButton = new RadioButton();
addChild(myRadioButton);
myComboBox = new ComboBox();
addChild(myComboBox);
myButton = new Button();
myButton.setStyle( "label", "Button" );
addChild(myButton);
override protected function
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
super.updateDisplayList(unscaledWidth, unscaledHeight);
if(super.data)
if (super.icon != null)
myRadioButton.x = super.icon.x;
myRadioButton.y = 2;
super.icon.x = myRadioButton.x + myRadioButton.width + 17;
super.label.x = super.icon.x + super.icon.width + 3;
else
myRadioButton.x = super.label.x;
myRadioButton.y = 2;
super.label.x = myRadioButton.x + myRadioButton.width + 17;
Content of comboBoxTree_test.mxml:
<?xml version="1.0" encoding="iso-8859-1"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="init();" >
<mx:Script>
<![CDATA[
import mx.collections.*;
[Bindable]
public var treeList:XMLList =
<>
<folder isBranch="true" label="Branch 1" >
<folder isBranch="false" label="Leaf 1" />
<folder isBranch="false" label="Leaf 2" />
</folder>
</>;
[Bindable]
public var folderCollection:XMLListCollection;
private function init() : void
folderCollection = new XMLListCollection(treeList);
comboBoxTree.dataProvider = folderCollection;
]]>
</mx:Script>
<mx:Tree
id="comboBoxTree"
itemRenderer="util.ComboBoxTreeRenderer"
labelField="@label"
width="100%" height="100%" >
</mx:Tree>
</mx:Application>
************************************************************** -
I just downloaded the 3 State CheckBox Tree custom control
from the Flex dev exchange a few moments ago. I put the code into a
Flex prject, compiled it and ran it pretty much unchanged. When I
click on any of the tree controls I get the error message:
ArgumentError: Error #2025: The supplied DisplayObject must
be a child of the caller.
at flash.display::DisplayObjectContainer/getChildIndex()
at mx.managers::SystemManager/getChildIndex()
at mx.managers::SystemManager/::mouseDownHandler()
Anybody else download this tag and have a problem like
this???
Have an Ordinary Day...
KomputerMan ~|:-)O.K. I pulled the downloaded component inside an existing
application and ran it from there. The problem was that the
downloaded component had a <mx:Application...> tag in it
which gave me two templates with the <mx:Application ...>
tag. Flex didn't like this too much. After I renamed the
<mx:Application...> tag in the downloaded component to
<mx:Canvas...> life was good. One of those duh moments...
DUH!!! :)
Have an Ordinary Day...
KomputerMan ~|:-) -
Hi,
Am using a tree control in our web application created using
class - CL_GUI_LIST_TREE with checkbox items.
When a user 'checks' the item , it went to hourglass for 2 to 3 mins.
Can you please let me know, is there any fine tuning is required
at code level or is there any parameter setting at ITS Level.
We are in ITS 620 and R3 4.7.
Thanks in advance,
Srini SHi,
At coding level, a solution could be to subgroup the main nodes in your tree control and send the 'children' of a node only when it is clicked.
Kind Regards,
Sükrü -
Tree Control - Performace - ITS 620
Hi,
Am using a tree control in our web application created using
class - CL_GUI_LIST_TREE with checkbox items.
When a user checks the item , it went to hourglass for 2 to 3 mins.
Can you please let me know, is there any fine tuning is required
at code level or is there any parameter setting at ITS Level.
We are in ITS 620 and R3 4.7.
Thanks in advance,
Srini SHi Srini,
I saw that you have asked this question in the ABAP forum too and got an answer there. Is your problem already solved?
Regards,
Henning -
Tree Control (button select all)
Hello,
i need a method for mark all checkboxes in the ALV Tree Control, does somebody know so a method? How can I add a push button in the push button bar?
regards,
MichaelHello Michael
The thread I have mentioned contains the coding for adding a button (e.g. MARK_ALL / UNMARK_ALL) in the ALV tree toolbar.
In the following thread
<a href="https://forums.sdn.sap.com/post!reply.jspa?threadID=375626">Catch Checkbox in Heirachycal ALV</a>
you will find sample coding which uses event HOTSPOT_CLICK in order to mark/unmark all checkboxes of a (sub-)tree.
Regards
Uwe -
How can I display and change built-in symbols of a tree control programmatically?
I want to set the built-in symbols of a tree control during runtime.
I only found an example to assign custom pictures but not how to select one of the 40 built-in symbol.
Many Thanks
Solved!
Go to Solution.The ActiveItem.SymbolIndex will allow you to select the symbol for the active item. You can use the ListBox Symbol Ring Constant (Dialog and User Interface palette) to select a symbol (or you can just enter the number directly if you know what it is).
Message Edited by smercurio_fc on 07-10-2008 09:36 AM
Attachments:
Example_VI_BD6.png 2 KB -
Not able to get the database data into the Tree Control
Hi Everybody,
I have to populate the tree control with nodes and items, which is to be populated from the database, and the tree control is <b>dynamic</b>. I mean, there is a <b>toolbar</b>, whenever a <b>pushbutton is clicked</b>, depending on that the tree contents has to be changed.
If anybody had worked with <b>CL_GUI_COLUMN_TREE</b> control to get the data from database, depending upon the <b>pushbutton selected in Toolbar</b>, please paste the seudocode for it.
Regards,
Abdul,
Intelligroup.
P.S: Helpful answers will be rewarded.have you seen this demo program
SAPCOLUMN_TREE_CONTROL_DEMO
Regards
Raja -
How to get all items under a parent item in a tree control
Hello,
I have 2 questions regarding a tree control:
1) Is there any way to specify a parent item tag and get an array of ALL its sub item tags? For example, in the attached vi, specify the Parent#2 parent tag and get an array containing Item#P21 and Item#P22
2) Is there a way to specify a range to the ActiveCell property. For example, all items from line#1 to line number#3
Any ideas?
Attachments:
Tree example.vi 6 KBMentos wrote:
1) Is there any way to specify a parent item tag and get an array of ALL its sub item tags? For example, in the attached vi, specify the Parent#2 parent tag and get an array containing Item#P21 and Item#P22
Did you try a search? There's no direct way of doing this. You have to navigate the tree and build up an array. You can find an example here: http://forums.ni.com/t5/LabVIEW/get-all-children-of-a-parent-in-tree/td-p/729548
2) Is there a way to specify a range to the ActiveCell property. For example, all items from line#1 to line number#3
No. (It's called ActiveCell, not ActiveCells) Presumably you are trying to perform an operation on multiple items. Unfortunately, you need to use a loop. You should defer panel updates if you're doing this a lot. -
How to binding incoming xml node list to the tree control as dataProvider
Recently, I faced into one issue: I want to binding incoming xml node (it's not avaliable at start) list to the tree control as a dataProvider.
Since the incoming xml node list is not avaliable at beginning but I needs to bind it to the tree, so I create one virtual one in the xml, and prepare to remove it before the tree is shown. (ready for the actual node adding). But It did not work.
Please see the presudo-code here:
1. Model layer(CsModel.as)
public class CsModel
[Bindable]
public var treeXML:XML=<nodes><car label="virtualOne" id="1">
</car></nodes>;
(Here, I want to build binding relationship on the <car/> node,
one 'virtual/stub' node is set here with lable="virtualOne".
But this node will be deleted after IdTree
control is created completely.)
[Bindable]
public var treeData:XMLList =new XMLListCollection(treeXML.car);
2. view layer(treePage.mxml)
private var _model:CsModel = new CsModel();
private function addNode():void
var newNode:XML=<car/>;
newNode.@label="newOne";
newNode.@id=1;
_model.treeXML.appendChild(newNode);
private function cleanData():void
delete _model.treeXML.car;
<mx:VBox height="100%" width="100%">
<mx:Button label="AddNode" click="addNode()" />
<mx:Tree id="IdTree" labelField="@label"
creationComplete="cleanData()"
dataProvider="{_model}"/>
</mx:VBox>
3. Top view layer (App.Mxml)
<mx:application>
<treePage />
</mx:application>
For method: cleanData(),It's expected that when the treePage is shown, we first delete the virutalOne to provide one 'clear' tree since we don't want show virtualOne to the user. The virutalOne node just for building the relationship between treeData and treeXML at beginning. But the side effect of this method, I found, is that the relationship between treeXML and treeData was cut off. And this leads to that when I added new node (by click the 'addNode' button) to the xmlXML, the xmlData was not affected at all !
So Is there any other way to solve this issue or bind the incoming xml node list to the xmlListCollection which will be used as Tree control's dataProvider ?If u want to display the name : value then u can do like this
<xsl:eval>this.selectSingleNode("name").nodeName</xsl:eval> : <xsl:value-of select="name" /> -
How can I save the all the values of a tree control ?
I have a problem, in run time, I adds new items on a tree control, but i don´t know how I can save the values of the child text of each item in a file.
Thanks.I'm no expert on the tree control, but I made a small example to save all items to a textfile, including item tag, item string, and indent level. One drawback of this method is that it fully expands the tree regardless how the user left it. To go the other direction, you'd have to write a routine to go through the text file and programmatically build the tree.
To master the tree control, I think you have to resort to creating a control reference for it and using the Invoke Node to do some operations. For another approach to traversing and operating on a tree, check out the "Traversing Tree Controls and Setting Custom Symbols" (search the NI Developer Zone site).
Best of luck,
John
Attachments:
Save Tree Structure to Textfile.vi 32 KB -
How can I drag and drop an item from one Tree control to another in LabVIEW 7.1?
You can use the mouse up and down event on the two tree controls but the problem is making the correct selection in the second tree control. I want to be able to switch over to the selection bar of the second tree control so that I can place my item in the correct position. I know all possible workarounds with double-clicks and so on... but I really want a windows drag and drop.
This is what I have for the moment. Please check the library below. I need to activate the selection bar of the second tree control somehow to get the position in the control. The VI below is written in LV 7.1
Attachments:
Drag&Drop.llb 65 KBHi Jones,
As far as I know this feature is currently not supported by the Tree control. A workaround, would be to use the vertical position of the mouse in the button up event to determine what line you�re dropping the item.
If you would like the Tree control to include the drag and drop feature, please submit this as a Product Suggestion under the feedback at www.ni.com/contact.
Good luck!
Best regards,
Philip C.
Applications Engineer
National Instruments
www.ni.com/ask
- Philip Courtois, Thinkbot Solutions
Maybe you are looking for
-
Updated to latest version today and it won't open now. Have rebooted numerous times, even did a restore to 5 days ago and nothing works. Did an undo on the restore, still nothing. Have used firefox for years with no problems.
-
How to get rid of annoying icon
So I just installed an update to acrobat 9 standard and now there is a big pdf icon overlaying my desktop in the upper right corner. It appears to have no purpose other than to annoy me. How do I get rid of it? I'm on Win 7. TIA
-
Request to techs: Please Darken the colour of the grey text.
Your drab new theme has also appears to have washed out the colour of the text. Please darken it more. Black would be good. roam
-
Can't figure out JVM instructions
Could anybody help me to decompile the following code? Seems to be a switch statement but I can't get real code out of these instructions. I've stripped away some lines of unnecessary (as I think) code. Most of all I am confused about this line : if(
-
Hi all, As Iu2019m very new to SAP BW, can u plz tell me how to complete the attribute change run that has failed in a process chain?