LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
manu.NET

Add Defer Panel update checkbox in event management ...

Status: New

Hello,

 

When you have to handle events, many times you have to use "defer panel updates"  fonctionnality, in order to make your front panel updates more fluent.

 

It could be nice to include a checkbox in the event configuration window, in order to ask (or not) an automatic defer panel Update.

 

If check box is checked :

 

  • At the begining of the event handler code execution : DeferPanelUpdate = TRue
  • Execution of the event code
  • At the end of the event handler code execution : DeferPanelUpdate = FALSE

DeferPanelUpdate for event handler.png

 

Manu.net

Manu.net
5 Comments
kegghead
Member
An additional option may be to skip re-enabling the panel at the end if there is another event already queued which also has the defer option set.
AristosQueue (NI)
NI Employee (retired)

Kegghead: That would be a dangerous addition -- there's no guarantee that just because there's another item in the queue that the event will be executed. The calling code might exit before calling the Event Structure again. And who knows what it might need to do in between (like the state machine pattern that has Event Structure in just one frame).

kegghead
Member
Good point. The original idea though is still a nice one.
AristosQueue (NI)
NI Employee (retired)

I agree with the original idea having merit. I should have said that in my first post.

altenbach
Knight of NI

One problem with this is that is is specific to event structures while it would be equally useful for other structures (how about a tight FOR loop, etc.). Also, there are probably events where it does not make sense (e.g. cursor move). How would you see the cursor move interactively if the FP does not update? Would this option cause a latch action button not to revert until the event has completed?

 

I still think it it would be sufficient to have a frame structure that defers front panel updates. It would be more universally useful (See the discussion of my old idea here). You could always place it in an event frame if desired.