09-28-2006 11:19 AM
09-28-2006 09:06 PM - edited 09-28-2006 09:06 PM
Message Edited by Darren on 09-28-2006 09:07 PM
09-29-2006 10:01 AM
09-29-2006 12:49 PM
Ok here is another dumb question. How do I indent items I want to be child items? I've tried different values (-1,0,1) into the child position array, but nothing there seems to work (at least the way I've tried to understand the help). So far everything I've tried ends up at the root level.
I want to do this
+--A
|
+-- B
+--C
and i'm getting this
+--A
+--B
+--C
09-29-2006 12:55 PM
Oh and another dumb question?
I don't quite get the point of the parent tag. Or more specifically, why they let you wire to the parent tag. I understand its supposed to be a unique identifier, but when I wire to it with unique values, it gives a 1008 error. If I don't wire it, it generates its own tag values.
09-29-2006 04:17 PM
Ok. I figured out my questions I raised above, but now I have another and hopefully final question.
How do you get any data (tag, whatever), from the tree control with a single click (I'm using the mouse up event).
With the double-click you get the tag item in the event structure, but you don't get that with a mouse up event.
What I had in mind was that when you did a single click it on the tree control it would display details regarding what
was selected, and when you double-click it would let you edit those details.
09-29-2006 09:51 PM
09-29-2006 11:44 PM
@ttrr wrote:
Hi,To get the tag in "mouse up" event, you can wire "Coords" to "Point to Row Column" method of tree control.This method converts a pixel coordinate to a tag-column pair in the coordinates of the control. It also returns whether the point is inside the bounds of the content rectangle and whether the point is within the custom symbol of the cell.
09-29-2006 11:47 PM
09-30-2006 12:07 AM
@Darren wrote:
The "Point to Row-Col" method mentioned by the previous poster is not available in LabVIEW 7.1, but a VI that has the same functionality is. Look in the vi.lib\tree folder for the Point to Row-Column VI. But instead of using Mouse Up, why not just use the Value Change event on the Tree Control and read the selected tag from the control terminal directly?By the way, don't feel bad about asking so many questions...I was one of the first people to do a lot of work with the tree control (and this was in LabVIEW 7.0 before it was even alpha), so I remember having these same kinds of issues...although, when I got really stuck, I guess I did have the advantage of asking the developer who was actually writing the feature... 🙂-D
Awesome idea! I'll check out the Point to Row-Column vi as well. I usually use Mouse Up cause it has worked well for me in the past. Didn't think of the value change event.
Thanks
Chuck