LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with "edit cell?" filter event

I am using a multicolumn tree in Labview 8.6.  I want the user to be able to edit column two of the tree for the leafs, but not the nodes.  I am using the "edit cell?" filter event to test which cell row/column is being edited to determine whether to commit the changes the user has made.  However, I am seeing some strange behavior and was hoping someone could point out if I am doing something wrong, or if it is a bug in Labview.

 

-- If I click twice slowly on the cell to enter edit mode, type the new text, and commit the changes by clicking a different cell of the tree, everything works as expected.

-- If I click twice slowly on the cell to enter edit mode, type the new text, and press Enter to commit the changes, the cell text reverts to the original text (this is not expected).  However, when I change which cell has the focus by clicking on a second cell, the display updates and correctly shows the recently commited text.

-- If I remove the "edit cell?" filter event so that all changes are accepted, the tree display updates as expected.

 

If this is a bug in the Labview tree control, does someone know a way of forcing the control to repaint?

 

Thanks in advance,

Kevin

 

(sorry, I accidentally posted this under the Labwindows forum first.  How do I remove a post?) 

0 Kudos
Message 1 of 8
(3,827 Views)

Try moving the terminal for 'Tree' into the 'Edit cell?' event.  This fixed the update issue for me.

 

Edit tree.png

Message 2 of 8
(3,809 Views)
Beat me by a mile!  Nice job Jack

"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 8
(3,807 Views)

Thanks for the suggestion of putting the terminal for the tree in the "Edit Cell?" event case.  However, when I try your fix in my actual program and not just a stripped down version I used as an example, the behavior unexpected behavior is still observed.

 

0 Kudos
Message 4 of 8
(3,792 Views)

Hey kdm14,

 

It is strange that you aren't getting this issue with the example program, only with your main program. What happens if you run your main program in highlight execution? Do you seen anything that jumps out at you? Would you be able to post your main VI where the issue seems to be occurring?

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 5 of 8
(3,775 Views)
OK, I should have been more thorough before my last post.  The fix suggested to move the terminal inside the "Edit Cell?" event case does not work in the example program on my computer either.  I jumped ahead and tested the fix in my real program without testing it on the example program, just assuming that the example program would work as Jack suggested.
0 Kudos
Message 6 of 8
(3,767 Views)

Hmmm.    event case does not work in the example program on my computer either.

-- If I click twice slowly on the cell to enter edit mode, type the new text, and commit the changes by clicking a different cell of the tree, everything works as expected.

-- If I click twice slowly on the cell to enter edit mode, type the new text, and press Enter to commit the changes, the cell text reverts to the original text (this is not expected).  However, when I change which cell has the focus by clicking on a second cell, the display updates and correctly shows the recently commited text.

 

That makes me wonder if you two have different properties for Tree.MultilineInput?

 

And that may be a buggy thing .  Probe it and find out- change both that property and Options:Advanced:Evironment:General:end text entry with enter key

 

There's only 4 cases so it might be interesting to check each one.


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 8
(3,747 Views)

Thanks to everyone for the comments.  I looked into the settings you suggested and couldn't find anything that worked.  However, a work around I did stumble on is to create an additional event case for the "Edit Cell" event (not the "Edit Cell?" event) in which I used the Ensure Visible method of the tree on the newly changed tag.  This causes the tree to be redrawn showing the correct text.  If you look closely, you can see the cell quickly flicker back to the original text before being redrawn correctly.  Suboptimal, but I guess I'll have to live with it.

 

Kevin

0 Kudos
Message 8 of 8
(3,735 Views)