Ola
I kindly request some help defining an event listener for this type of function..
My tree is currently a BANanoObject, which is fine, just need to figure out the next part of the equation
I'm dont have a clue because the event function above has three arguments, how do I convert such javascript code to banano code and also be able to get the node and id passed?
These are some of the other events that I'd like to add for the control.
Thanks
I kindly request some help defining an event listener for this type of function..
B4X:
tree.on('collapse', function (e, node, id) {
alert('collapse is fired.');
});
My tree is currently a BANanoObject, which is fine, just need to figure out the next part of the equation
B4X:
tree.AddEventListener("collapse", xxx, xxx")
I'm dont have a clue because the event function above has three arguments, how do I convert such javascript code to banano code and also be able to get the node and id passed?
These are some of the other events that I'd like to add for the control.
B4X:
'tree.on('enable', function (e, node) {
'alert(node.text() + ' is enabled.');
'});
'tree.on('disable', function (e, node) {
'alert(node.text() + ' is disabled.');
'});
'tree.on('expand', function (e, node, id) {
'alert('expand is fired.');
'});
'tree.on('select', function (e, node, id) {
'alert('select is fired for node with id=' + id);
'});
'tree.on('unselect', function (e, node, id) {
'alert('unselect is fired for node with id=' + id);
'});
'tree.on('checkboxChange', function (e, $node, record, state) {
'alert('The new state of record ' + record.text + ' is ' + state);
'});
Thanks
Last edited: