LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

file path control

Solved!
Go to solution

Hi, I experimented using file path control including files and folders, new and existing; however, I am seeking a method to determine how to detect if the user pushes the cancel button.  It appears to me there should be a logical value some where indicating status of "cancel" in path control.  Thanks in Advance!

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

As much as I hate Express vi's in this one application I will recommend using one.

 

The  "File Dialog" express vi has an output that will be True if Canceled was pressed in the dialog box. Or you could always error check your path after the user enters it to make sure is it valid. ( It won't be if the user canceled it)

 

fdCapture.PNG

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 4
(2,485 Views)
Solution
Accepted by topic author Spence0

When the user browses to a file, that constitutes a Value Change event for the control.

When the user starts browsing, then cancels, the value is unchanged, so nothing happens.

If you really need such behavior, you can make an XControl.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 4
(2,472 Views)

Thanks,  I was evaluating the result to determine what happened but just thought I might l be missing something.  I like your event case approach.  

0 Kudos
Message 4 of 4
(2,461 Views)