Jump to content

[CR] Tree Control API


Recommended Posts

index.php?automodule=downloads&req=display&code=sst&id=71
File Name: Tree Control API

File Submitter: njkirchner

File Submitted: 10 Jan 2007

File Category: User Interface

Description

{Almost}Everything you every wanted out of the tree control but were too afraid to build.

Provides extended/smart/wrapped functionality of the tree control.

Functions

Add Item

Modify Item

Remove Item

Get All Items

Get Top Level Items

Get Items Parent

Get Selected Item

Get Siblings

Get Children

Get Item Properties

Check Tag Valid

Convert Tag to Text

Find Tag from Text

Outdent at Item

Indent At Item

Expand

Collapse

Empty Tree

Notes

Capable of working w/ LV 7 or later but uploaded version is for LV 8.2. Please request previous version if necessary.

Good to recognize that the tree control is just a fancy multi-column listbox.

Version

1.0.0 Initial Release

1.0.1 Example program added

Click here to download this file

Link to comment

I would just like to say thanks! These VI's are going to help ease the pain of working with Tree Controls. Tree Controls are great, but where a bit messy to get everything into and out of. This set of VIs (although I haven't put them to use yet) are going to make using Tree Controls much cleaner.

Edit: I also just noticed the INI Viewer. Very handy little tool! Even if someone isn't looking for a way to make working with Tree Controls easier, they might be interested in checking out this tool.

Thanks,

Dave Graybeal

Link to comment
Provides extended/smart/wrapped functionality of the tree control.

Sounds good! A few comments:

  1. The VIs should not be read-only, LabVIEW needs to be able to recompile the VIs when you upgrade to newer version of LabVIEW and occasionally when there is something weird going on in your project.
  2. Ability to add custom icons would be super!
  3. The LGPL license is viral in LabVIEW, meaning that if I use your library in my application it forces my application to ship under LGPL license. Could you consider licensing your package under EPL/MLP/GPL/LGPL multi-license. See thread Open Source Licensing of LabVIEW Packages for more information.

jimi

Link to comment
  • 2 weeks later...
Sounds good! A few comments:
  1. The VIs should not be read-only, LabVIEW needs to be able to recompile the VIs when you upgrade to newer version of LabVIEW and occasionally when there is something weird going on in your project.
  2. Ability to add custom icons would be super!
  3. The LGPL license is viral in LabVIEW, meaning that if I use your library in my application it forces my application to ship under LGPL license. Could you consider licensing your package under EPL/MLP/GPL/LGPL multi-license. See thread Open Source Licensing of LabVIEW Packages for more information.

jimi

Ok, Sorry about not getting to this posting sooner. I didn't Know it existed {never got notification}.

But on a few of your points.

1.The VIs are read only because I built the zip from VIs that are in source control {uses read only to handle checking in and out} so feel free to do a change all once unzipped

2. Custom Icons??? once you change the VIs from read only, change whatever you want

3. I thought the LGPL would let you do whatever you wanted, I'll follow the recommendations of the group to make them as usable as possible.

Also to all of you,

Thank you for the kudos. This toolkit is my baby and I'm glad you all like it.

Be careful w/ the INI viewer though, it's been a while and I know that it hasn't gone through a ton of debugging and I don't want to mess up any of your INI by accident.

Very nice tool. I was wondering if you thought about handling multiple layers of children as well as reading and writing symbol index to ini file as well as multiple column information vs. just column index 1.

Thanks

Steve M.

Well when it comes to the INI viewer, it's meant to handle standard INI. It was never used extensively, but rather as a proof of concept and an excuse to use the tree.

So in a standard INI there are only 1 layer of children.

Feel free to extend the capability and post it back here. I'll modify the zip if it looks like they're good changes

Hi

You Said:

Notes

Capable of working w/ LV 7 or later but uploaded version is for LV 8.2. Please request previous version if necessary.

Please is it possible to have a 7.0 version. :thumbup:

Regards

I know that some minor changes have been made since the 7.0 version so I can't vouch for their absolute sameness, but they all use the same connector pane and operate really close, so they should be forward compatible if you upgrade.

Give me a few days to get to posting it, but I'll dig um up.

Link to comment
2. Custom Icons??? once you change the VIs from read only, change whatever you want

You misunderstood me. The elements in a tree can have icons in a similar way as each item in LabVIEW 8.0 and later project explorer has icons. The addition of icons using the property nodes is somewhat complicated and therefore it would be nice if there was a simple way to specify an icon of an item.

BSD license would be super! I think crelf and Jim Kring agree with me on this.

Link to comment
You misunderstood me. The elements in a tree can have icons in a similar way as each item in LabVIEW 8.0 and later project explorer has icons. The addition of icons using the property nodes is somewhat complicated and therefore it would be nice if there was a simple way to specify an icon of an item.

BSD license would be super! I think crelf and Jim Kring agree with me on this.

For the Item symbols ('icons') you can use the modify item call, and I think you just need to re-define what the icon at an index is from another function, which, i'm assuming this is what you want, I don't have.

I'll look into it though, as I have thought about it before myself too.

Link to comment
For the Item symbols ('icons') you can use the modify item call, and I think you just need to re-define what the icon at an index is from another function, which, i'm assuming this is what you want, I don't have.

No, I don't want to know anything about icon indices. I just would like to add a new item to the tree and specify that this item icon is defined by this image data and the tree control would check if that icon is already used in the tree and if not then add it to one of the icons and then set the icon index of the current icon properly.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.