File type editor

Hi,
in a sample app (Folderitem Dialogs), I see the follow code:

// The filter is what type of file you are looking for
// The filters are defined in the File Types dialog
// inside the edit menu
dialog.Filter = text/plain

In my edit menu (xojo 2016R4.1) there is not “File Type” inside edit menu.

Thank you

Do you insert file type in a file type group on the IDE from the Insert button ?

1 Like

fabio says: xojo 2016R4.1

To add a FileType, go to the Insert Menu (MenuBar) and… Insert a FileType (or something that looks like that).

Then, in the Navigation pane (left), setach for FileType1,
select it,
rename it to something meaningful (that’s for you)
then add a File Type (look in the middle of the window since I forget that one),
then you have PopupMenus to add either a blank you have to populate or at the window bottom to choose some already defined.
“text/plain” is in the PopupMenu.

1 Like

If you are on macOS, you can drag file types into the FileTypeGroup editor and it will attempt to extract the info it needs from the item.

3 Likes

Do you mean drag files, or drag file types? If file types, where are these found?

Well he’s going to mean files, wouldn’t you say?

just tested it, works fine. thanks Greg !

Yes, files. Sorry about that… and folders/bundles. It’ll handle that too.

1 Like

Thanks for the clarification. I thought maybe I was missing something.
Anyway, that’s a handy tip. Thanks for posting it.

fabio ?

Emile, for me it work exatly as you advice me!
Thank you