|
|
|
9
Below is a bit of code which sets up drag and drop in a treeview. This is handy for if you have a list of items that can be sorted by the user.
Here is a bit of code to demonstrate how to do this. First create a new Windows executable project. Drop a TreeView component on the form, and let's name it 'myTree' for this demonstration. Go ahead and populate it with some dummy data; enough data to see the dragging and dropping in action. You will need a variable global to the form's scope.
private TreeNode sourceNode;
This is used to track the item we are dragging in our TreeView. Then define the event handlers listed below.
Here is a bit of code to demonstrate how to do this. First create a new Windows executable project. Drop a TreeView component on the form, and let's name it 'myTree' for this demonstration. Go ahead and populate it with some dummy data; enough data to see the dragging and dropping in action. You will need a variable global to the form's scope.
private TreeNode sourceNode;
This is used to track the item we are dragging in our TreeView. Then define the event handlers listed below.
2
Essentially, lets your users click a whole line of checkboxes by clicking the first and dragging down the line.
This is a crop-in script. That is to say, include it on your page, and you need do nothing else. Even primitive event handlers (element.onchange, for example) are supported, with no action on your part.
A demo of it in action is on my hosting:
http://fordi.org/test/checks.php
This is the jQuery-compatible version. The libless version will be up soon.
This is a crop-in script. That is to say, include it on your page, and you need do nothing else. Even primitive event handlers (element.onchange, for example) are supported, with no action on your part.
A demo of it in action is on my hosting:
http://fordi.org/test/checks.php
This is the jQuery-compatible version. The libless version will be up soon.
3
Essentially, lets your users click a whole line of checkboxes by clicking the first and dragging down the line.
This is a crop-in script. That is to say, include it on your page, and you need do nothing else. Even primitive event handlers (element.onchange, for example) are supported, with no action on your part.
A demo of it in action is on my hosting:
http://fordi.org/test/checks.php
This is the libless version; that is to say, it is independent of and doesn't interfere with any Javascript libraries, such as jQuery, Prototype, MooTools, etc.
This is a crop-in script. That is to say, include it on your page, and you need do nothing else. Even primitive event handlers (element.onchange, for example) are supported, with no action on your part.
A demo of it in action is on my hosting:
http://fordi.org/test/checks.php
This is the libless version; that is to say, it is independent of and doesn't interfere with any Javascript libraries, such as jQuery, Prototype, MooTools, etc.







