3.0 beta 2

check checkbox

HI,
Is it possble checked a checkbox tree item without setItemValue.

Help please.
Thanks.
Igor K.
September 20,
There are two types of checkboxes - one is linked to itemValue (AW.Templates.Checkbox) and the other one linked to stateSelected (AW.Templates.CheckedItem). You can do your own as well - look at the source code for these two in /source/lib/templates/checkbox.js and checkeditem.js
Alex (ActiveWidgets)
September 21,
Hi, Alex!
I need clicked a checkbox child node of tree programatically with onItemValueChanged event.
AW.Templates.CheckedItem creates Tree without checkboxes.
var MyTreeCheckbox = AW.Tree.Item.subclass(); 

MyTreeCheckbox.create = function(){ 
    AW.Templates.CheckedItem.create.call(this); 
} 
var treeValue = ["", true, false, "mixed", false, true, false]; 
var treeText = ["", "Home", "Favorites", "Font size", "Search", "Child1", "Child2"]; 
var treeImage = ["", "home", "favorites", "fontsize", "search"]; 
var treeView = {0:[1, 2, 3, 4], 1:[5, 6], 2:[7], 3:[8], 4:[9]}; 

var tree = new AW.UI.Tree; 
tree.setItemTemplate(new MyTreeCheckbox); 
tree.setItemValue(treeValue); 
tree.setItemText(treeText); 
tree.setItemImage(treeImage); 
tree.setViewCount(function(i){return treeView[i] ? treeView[i].length : 0}); 
tree.setViewIndices(function(i){return treeView[i]}); 

document.write(tree);

tree.onItemClicked = function(event, i){ 
    alert(i); 
} 

}


Please http://www.... for /source/lib/templates/checkbox.js and checkeditem.js
if I don't understand You. I don't found it. Better simple code.

Thanks.
Igor K.
September 21,
Hi, Alex!
I am using AW.Templates.Checkbox.
Is it possible ?

Thanks.
Igor K.
September 24,
Igor,

The file /source/lib/templates/checkbox.js (the source code for AW.Templates.Checkbox) is located in /source directory in your download package (licensed version). If you are still playing with the trial package - the source code is not included in the trial.
Alex (ActiveWidgets)
September 24,
Ok!
Thanks.
Igor K.
September 25,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.