Categories | Question details Back To List | ||
double click Hello, We have professional version of dhtmlx1.6 I would like to know whether there is double click event for checkbox,basically i want to select all the child checkboxes on double click of parent checkbox in dhtmlx tree. Answer posted by Stanislav on Sep 29, 2008 15:16 There is no separate doubleclick for checkbox, and common event will work only for text part of item, but you can do a bit of timing magic with onCheck event to detect the doubl-clicks. Something similar to next var last=0; tree.attachEvent("onBeforeCheck",function(id){ //called each time when checkbox clicked var time = (new Date()).valuerOf(); if (time - last < 100 ) { //100ms is time between clicks, need to be adjusted to your needs //double click occurs custom_code(); return false; } else { //just normal click, save time and confirm execution last = time; return true; } }) |