:: Forum >> Version 2 >>

check checkbox

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

Help please.
Thanks.
Igor K.
Thursday, September 20, 2007
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)
Friday, September 21, 2007
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 = [""truefalse"mixed"falsetruefalse]; 
var 
treeText = ["""Home""Favorites""Font size""Search""Child1""Child2"]; 
var 
treeImage = ["""home""favorites""fontsize""search"]; 
var 
treeView = {0:[1234], 1:[56], 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(eventi){ 
    
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.
Friday, September 21, 2007
Hi, Alex!
I am using AW.Templates.Checkbox.
Is it possible ?

Thanks.
Igor K.
Monday, September 24, 2007
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)
Monday, September 24, 2007
Ok!
Thanks.
Igor K.
Tuesday, September 25, 2007



This topic is archived.

Back to support forum

Forum search