Jump to content

Multiple Patterns in LabView File Dialog


Recommended Posts

Just a sidenote, even if you remove the "All Files" selector, a user can still display all files by typing "*.*" into the field and pressing Enter (on Windows, anyway).

Link to post
Share on other sites

Let's see if this image looks better:

post-941-127292431924_thumb.png

How it works better...

The \00 is the NULL chracter, you have to switch to '\' Coded Display, to get it working.

This is the string you can use to tweak the File Dialog bevaviour.

*.txt;*.doc;*.html)\00*.txt;*.doc;*.html;\00Image\sfiles\s(*.png;*.jpg)\00*.png;*.jpg\00\00

I'm not sure why it works, and if it always will be supported but it's quite good feature.

//Mikael

Edited by MikaelH
  • Like 1
Link to post
Share on other sites

*.txt;*.doc;*.html)\00*.txt;*.doc;*.html;\00Image\sfiles\s(*.png;*.jpg)\00*.png;*.jpg\00\00

I'm not sure why it works, and if it always will be supported but it's quite good feature.

That's the format of a string which can be passed right into Windows API for a common Open/Close/Save dialog (anyone who's used Visual Basic or CMNDLG32.DLL should recognize it), so it won't be changing anytime soon. I only presume that NI works some magic in the background to ensure cross-platform compatibility, but I have no particular experience myself.

Link to post
Share on other sites

That's the format of a string which can be passed right into Windows API for a common Open/Close/Save dialog (anyone who's used Visual Basic or CMNDLG32.DLL should recognize it), so it won't be changing anytime soon. I only presume that NI works some magic in the background to ensure cross-platform compatibility, but I have no particular experience myself.

I haven't tried this but would strongly guess, that this is really just a Windows feature and by coincidence rather than by design. If it was designed that way they certainly would have made it more user friendly.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.