How do you specify file type...

Wednesday, May 17, 2006 by frasej | Discussion: DesktopX

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
Keikonium
Reply #1 Wednesday, May 17, 2006 6:40 PM
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 .

You could always try it and see .
frasej
Reply #2 Thursday, May 18, 2006 9:18 AM
I don't believe that will work as Type only recognizes certain key words.

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01