Board Logo

item state
rover - 10/13/2006 at 02:17 PM

This is a greate tree control. I am trying the free one now. I do not mind to buy the pro one. However I need to make sure 2 features are supported.

1. I need to be able to find the selected item in JS.
2. I need to be able to format the caption with more information like folder description, last modified date and time for folders and file type, file size and last modified date and time.

I am working on the 1st one now. I appreciat if someone can help out.

How to check the state like opened, closed, selected, deselected of tree item?

I have a leaf item which is selectd or highlighted. When I tried to test its state in JS like this

alert('b_selected is ' + o_item.b_selected);
alert('b_toggled is ' + o_item.b_toggled);
alert('b_opened is ' + o_item.b_opened);
alert('b_highlighted is ' + o_item.b_highlighted);

Only b_opened returned false and others are undefined.

Thanks in advance for any help.


tigra - 10/13/2006 at 03:25 PM

in the PRO version the state is stored in the .n_state property (bitmap). With free version you'll need to add the flags in the methods that change the state to keep track of it.

With the free version check out function item_get_icon to get the idea how different states are detected.

Back to forum: