« Our JavaScript engine… | Home | MBS Xojo Plugins, ver… »

Customized File Open and Save Dialogs for Windows

This week, I learnt a lot about the APIs from Microsoft for open and save dialogs. For Xojo we got new WinFileOpenDialogMBS and WinFileSaveDialogMBS classes. Both are based on WinFileDialogMBS class and report errors via WinFileDialogExceptionMBS. To return items, we use WinShellItemMBS class and WinShellItemArrayMBS for a list of items. To define file types, we got the WinFileTypeMBS class. The dialog may look like this:



We customized the title, the OK button, the label for the file name and added a list of file types to fill the file types popup menu. As you see there are custom controls on the dialog with two text fields and a checkbox with a popupmenu below. We added a lot of events for the WinFileDialogMBS class, so you not just learn about changed selections, folder changes, but also about events to custom controls. In the CheckButtonToggled event as an example we can react on the checkbox and enable/disable the popupmenu below.

While most people are happy with the built-in OpenFileDialog and SaveFileDialog classes, our plugin classes offer many more features for Windows specific projects. Please check NSOpenPanelMBS and NSSavePanelMBS classes for MacOS to do similar things. And we still have OpenDialogMBS as a cross platform class.

The example project with a lot of settings:



Please try soon with next prerelease of MBS Xojo Plugins 20.1. The biggest plugin in space...
07 02 20 - 14:45