Dim dDialog as FolderItemDialog
Dim fFolder as FolderItem
dDialog = New OpenDialog
dDialog.Title="Select a Database file"
dDialog.Filter=FileTypes1.sql <========
fFolder = dDialog.ShowModal()
I need an open dialog for the user to select a SQLite database file. It seems to work ok except that .sqlite files are grayed out in the open dialog so I can’t open a database. I added a line (manually, not using the drop down menu) in the FileType1 editor that has:
Display Name: database/sql Object Name: sql MacType: sqlite Extensions: .sqlite nothing else on the line
Did as you recommended but now instead of the .sqlite files being grayed out, everything is available like no filter at all is in effect. I watched the debugger and the the .filter value pointed to database/sql.
I use sqlite as file extensions and a variation of:
Dim SQLiteType As New FileType
jpegType.Name = "database/sqlite" // I do not recall
jpegType.MacType = "????" // I do not recall
jpegType.MacCreator = "????" // I do not recall
jpegType.Extensions = ".sqlite"
I hope this help (I do not have my SQLite external hard disk with me right now).
I’m not getting this. It does not filter. Of course I’ve tried so many different ways that I’ve probably got it mucked up pretty good. Here’s what I got. I used the File Types Set to create a file type and filled the fields in like this:
Then I create an OpenDialog with this filter: dlg.Filter=FileTypes1.SQLite
Code looks like this:
Dim dlg as OpenDialog
dlg=New OpenDialog
#If Not (TargetLinux) then
dlg.InitialDirectory=f
#Else //open Home directory on linux
dlg.InitialDirectory=f
#endif
dlg.Title="Select a Database file"
dlg.Filter=FileTypes1.SQLite //Defined as file type in FileTypes1.
f=dlg.ShowModal()
Where am I getting this wrong? I’ve also tried defining a “pdf” file type and that doesn’t work either.