LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modal fight between print dialog and LV

The code looks like this:

print hello world.png

I have the window set to "dialog"

dialog.PNG

The resulting dialog is on top but when I go to type a file name or click on it, the clicks don't register. I have to click off the window and then back in to do anything.

Save dialog.png

Does anyone know how to solve this? I'd like the hello world front panel to be modal again after the print dialog goes away but the print is asynchronous and there's no event to tell me when the front panel is back on top.

 

0 Kudos
Message 1 of 8
(2,799 Views)

You can try using the VI property node: Front Panel Window >> Behavior. Set it to default at the beginning of this event, and back to modal at the end of the event.

0 Kudos
Message 2 of 8
(2,780 Views)

Like I said, that doesn't work because the print function is asynchronous. That is, the print VIs complete execution while the "save print" dialog is still up so setting "hello world" back to modal continues the fight.

0 Kudos
Message 3 of 8
(2,776 Views)

I see, that is because the HTML print saves an html file and then tells internet explorer to print it. Can you try using a standard report?

 

Also, it doesn't look like HTML print actually uses the printer you tell it to, it just uses your default printer.

0 Kudos
Message 4 of 8
(2,772 Views)

Interesting. The standard reports behave properly. Sounds like while the HTML report might be more flexible in terms of formating, it might also have some bugs.

0 Kudos
Message 5 of 8
(2,762 Views)

Also, according to Darren N, the Standard Report is "going away", to be replaced by the HTML Report in LabVIEW 2018 (comment on a recent post on this Forum).

 

There have been several posts recently about printing Reports -- there appear to be some "quirks" in the implementations, so be wary.

 

Bob Schor

0 Kudos
Message 6 of 8
(2,730 Views)

It seems insufficient to attach a snippet because it does not capture the VI configurations. Can you attach the actual VI?

 

  • Why exactly is the VI set to "dialog"? Does not really look like a dialog.
  • Why is the event case set to "lock front panel until event completes"? Wonder if unchecking that would make a difference.
0 Kudos
Message 7 of 8
(2,718 Views)

I've attached the VI.

 

This particular VI might not look like a dialog because I've slimmed it down for posting purposes. I want to walk the user through a sequence of instructions. In this particular case, I want the user to be able to print, see that the printout looks OK, and then continue to the next step.

 

I tried unchecking the "lock until event completes" but there was no change in behavior.

0 Kudos
Message 8 of 8
(2,679 Views)