guy Posted November 30, 2002 Report Share Posted November 30, 2002 Does anyone have a vi which functions like the windows tree control? We have embedded the active X tree control in our application and we found that labview does not support the tree control in the new web server feature. We need a real labview vi that simulates the tree control Please let me know, your help would be greatly appreciated Guy Quote Link to comment
Michael Aivaliotis Posted December 1, 2002 Report Share Posted December 1, 2002 Well, its seems that a native treeview control may be in the works for a future version of LV as was hinted on info-labview. If you can't wait that long then you will notice that a modified multicolumn listbox exists in LV that will give some similer functionality. Below is an excerpt from some posts on info-labview on how this control works and how to get it: > If you want to see something interesting, look at the listbox contained in> the Find Examples. It is a native LabVIEW control. To see the pictures > just run the Find Examples select a few levels until you see a little > LabVIEW icon. Right click, copy data, go to a new LabVIEW window > and press > control-V. The whole control will be copied, not just the data. Create a > property node and look at the strings and the item symbols. You will > notice item symbols with the following values: 14, 15, 65563, > 132103 and so > on. Is this the future treeview Greg was hinting at, or is it just an > experiment. I haven't decode them all. -------- It seems like the large numbers are there to introduce an offset to the icons (indentation effect). 65536 is the offset code + 14 or 15 which would be an open or closed folder symbol. But I believe its just a multicoloumn listbox at heart. However having said that there MUST be a hidden property to enable indentation because you can't perform this on a defualt multicoloumn off of the pallete. -------- Ooops, bug from National Instruments! The VI is very much protected with a password. That Copy does copy the whole control instead of only the data in a running VI is most probably not an intended behaviour ;-). As far as the icons are concerned, I fiddled a little with them. Besides of the normal icons in standard list box controls you have a bunch of predefined from index 1000 up. They are all in color. There seems no way of adding your own icons though. And the icon index is really a combination. Lower 16 bits are the icon index and higher 16 bits are the indention levels. So do your work with it guys! -------- > Well, more digging reveals that the extended symbols start at code 1000 and > up. The high numbers are deffinitlly there for indentation. So, every time > you add a multiple of 65536 to your code number then you indent it by 1 > indentation mark. Now why the hell isn't all of this available on the > default multi-coloumn listbox? I am a very upset camper here! > > Lucy! I mean Greg, you have some splainin' to do > Splaination follows. All programmers with deadlines will eventually have to do things they aren't proud of. Some call it hacking, others call it thinking outside of the box. Years ago, people on the LV team wanted a tree control. We didn't have one. So we got creative, grabbed the nearest listbox and added some obscure encoding so that we could get done what we wanted/needed. Tah-dah. We have a prototype for a tree control. One with lots of limitations that isn't very easy to use from the diagram, but one that would let us get a few utilities such as the Example Finder out the door and teach us what it would take to build one for real. No, this isn't the thing we plan to release, otherwise we would have done it years ago when the hack occurred. We decided not to subject the typical LV user to our hack, and have rarely used it internally. So while you might find it interesting to reverse engineer this odd relic that you found on the side of the road, don't get too attached to it. We had not planned to support it once we have something better. That was why it wasn't exposed/documented in the first place. As discussed earlier, major portions of LV, like the more complex controls, are revamped and rewritten whenever enough features have been added to make them lopsided. Some features are easy to add to existing controls, others, like custom symbols seem easy, but behind the scenes require major work. Once again, the elves have been seen in the forest. I think I hear chopping noises. And just so we are all on the same page, please don't refer to them as my elves. My ears are just as pointy as theirs. Greg McKaskle Enjoy Michael Aivaliotis Quote Link to comment
dikrn Posted January 17, 2003 Report Share Posted January 17, 2003 Yes a listbox can be an alternative. If you want something similar to windows explorer, you can open VI Library Manager (under 'tools''VI Library Manager'), then press [Ctrl]+[.] (shortcut for the STOP button). That should give you a template to start with. Quote Link to comment
LAVA 1.0 Content Posted May 21, 2003 Report Share Posted May 21, 2003 Now available in LabVIEW 7. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.