LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Right click menu - Tree - Timing issue in UI Updates

Hi All,

 

I am facing a problem in with respect to Right Click Shortcut menu.

I have a tree control and I am populating certain items in the tree. I am updating the tree's shortcut menu based upon the selection. I am using Point to Row Column method to find the current selection and setting it as tree value using property node. Based upon the selection there needs to be a number of operations in order to update the background data structure and UI. So I am looping in all the cases to do the same.(I use State machine architecture).

 

The cases starts executing as expected properly until the right click menu appears. Once it appears, the execution pauses wherever it is and resumes its execution upon next mousedown event (Either the right menu or anywhere). Because of this the Menu items are not proper and also the UI is also not updated.

 

Please let me know if you have any suggestions.

0 Kudos
Message 1 of 4
(2,767 Views)

You forgot to post your code, so I'll just have to guess...

 

Are you using an event structure? Do you have 'lock panel until event completes' ticked? Is the event structure in the same loop as your processing/update code?

 

It's also quite possible that the right click menu runs in the UI thread so it blocks anything else running in the UI thread until it completes.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 4
(2,730 Views)

Yes I use event structure in the State Machine. There is only one while loop for the Event Structure/Operations. Few Defer panel updates are there, but the execution pauses even before the case with the defer panel property node is reached.

 

Even I suspect the issue is related to UI thread. 

0 Kudos
Message 3 of 4
(2,712 Views)

@Sam_Sharp wrote:

You forgot to post your code, so I'll just have to guess...

 


How about we take the guesswork out?


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 4
(2,707 Views)