SlickEdit Community
SlickEdit Product Discussion => SlickEditĀ® => Slick-CĀ® Macro Programming => Topic started by: msCoder on November 19, 2021, 01:35:38 pm
-
I am developing a custom form which has a tree_view control in it. I would like to be able to save the tree_view elements when I quit SlickEdit and then be able to restore them the next time SlickEdit is started. Can anybody give me some guidance on how to do this?
Thanks,
Mark ???
-
Take a look at _TreeSaveDataXML and _TreeLoadDataXML. I will try to put together a sample later today.
-
Thank you for the quick response. I have given it a try - copying what I found in svcurl.e (which uses that function).
Partially works. My tree_view contains 5 columns. The first three are check-box columns, and the last two are text-columns.
The effect I am getting is that only the last two text-columns are getting restored. The first three columns do NOT show me a check-box??
Will keep trying...
-
It is possible it doesn't save and restores checkboxes, I will take a look at it later. I may be able to add it.
-
Thank you again for the help. By using the callback functionality of _TreeLoadDataXML() & _TreeSaveDataXML(), I was able to add XML attributes to each node in the XML file, saving the checkbox state. When my 'load' callback is called I fetch the attribute and then call _TreeSetCheckState()
Seems to do the trick.
-
That's great, I'm sorry I didn't think of that.