LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tree not update with item deleted

Solved!
Go to solution

Hi,

I am using Tree control.

Normally, the tree gives out the tags of selected items. However, If I select one item and then delete it, the tree output doesn't change. See attached please. Thanks.

 

LV2019sp1, win 10

WT

0 Kudos
Message 1 of 11
(1,784 Views)

That's a bug alright...

 

I can confirm this on LV20, 64 bit.

 

Instructions:

+ Select an item

+ Run VI

+ Notice the value in the array

+ Delete the selected item

+ Run VI

+ Notice the value is still in the array

 

Is this just an edit time problem? Selecting another item fixes the problem.

 

If this is a problem during execution, I suppose there are ways around it. We'd need a specific use case though.

0 Kudos
Message 2 of 11
(1,755 Views)

Thanks for your comments.

I found a temporary solution by following a property setting “ Reinitial to default”. 

Tree update problem_solutionTree update problem_solution

Message 3 of 11
(1,739 Views)

@weitong wrote:

Thanks for your comments.

I found a temporary solution by following a property setting “ Reinitial to default”. 

Tree update problem_solutionTree update problem_solution


I think this could help me!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 11
(1,725 Views)
Solution
Accepted by topic author weitong

I'd probably just set the value with a property node.

 

Maybe even a value (signaling), if there's an event attached to it.

Message 5 of 11
(1,707 Views)

wiebe@CARYA wrote:

I'd probably just set the value with a property node.

 

Maybe even a value (signaling), if there's an event attached to it.


I think I actually tried this before and it didn't work right.  But it was very long ago.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 11
(1,694 Views)

@billko wrote:

wiebe@CARYA wrote:

I'd probably just set the value with a property node.

 

Maybe even a value (signaling), if there's an event attached to it.


I think I actually tried this before and it didn't work right.  But it was very long ago.


Works for me in LV20.

0 Kudos
Message 7 of 11
(1,687 Views)

Maybe I can revisit that software.   It was the first - and last - time I used a tree control and I was disappointed with it, to tell the truth.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 11
(1,682 Views)

@billko wrote:

Maybe I can revisit that software.   It was the first - and last - time I used a tree control and I was disappointed with it, to tell the truth.


It's a wild beast to tame.

 

A tree and a subpanel showing the selected item, and item specific right click menus, can replace very complex alternatives. For some applications, there's really no substitute.

 

The API isn't exactly intuitive, but I'd almost always wrap things in a class anyway.

 

Especially custom drag and drop functionality is not as easy as it should be. The moment you catch one drag and drop event, you need to handle all drag and drop events. But this is the same for listboxes.

0 Kudos
Message 9 of 11
(1,673 Views)

I think I was most disappointed that the names weren't namespaced.  If the same name occurred ANYWHERE in the tree it gives it a new tag name, which complicated the code somewhat.  It wasn't as elegant as I had hoped it would be.  I was hoping to use it to duplicate a CLI command tree.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 11
(1,661 Views)