How do you specify file type...

Here's a snippet of my code:
Widget.AddPreference "SSName"
Widget.Preference("SSName").Type = "File"
Widget.Preference("SSName").Caption = "Screensaver File"
Widget.Preference("SSName").DefaultValue = "scrnsave.scr"


This creates a [Browse] button in the preferences dialog. The problem is, it shows every file. Is there a way to specify which file types I want to be seen. Ex: *.scr
2,717 views 2 replies
Reply #1 Top
Just a guess, but I am thinking that changing:
Widget.Preference("SSName").Type = "File"
to
Widget.Preference("SSName").Type = ".scr"

would make it only look for .scr files. I am not a coder for widgets, so I don't know for sure :S.

You could always try it and see .
Reply #2 Top
I don't believe that will work as Type only recognizes certain key words.