« MBS @ FMTraining.TV -… | Home | MBS Xojo Conference -… »

News from the MBS Xojo Plugins Version 24.2

In this article I want to introduce you the new functionalities from the MBS Xojo Plugins in version 24.2.


For MBS Xojo Plugins 24.2 we include new XL classes to create conditional formatting in an Excel file created in code. While you can always load an existing document with conditional formatting or diagrams and just fill the cells with data, we now can create the rules for conditional formatting in code. Our blog article explains exactly how this works: Conditional Formatting in Excel exports from Xojo. Just take a look and try it out.

See XLConditionalFormatMBS and XLConditionalFormattingMBS classes.


Our MongoDB classes got improved with new methods to execute custom commands with Command methods in MongoClientMBS and MongoDatabaseMBS classes. If you expect a result, please use CommandQuery method instead and loop over the returned documents. You can set the app name in the MongoURIMBS class to be reported to the server on connecting and query the credentials used.


We add a new method to the JSONMBS class. With the Merge method, we can merge several JSON objects or JSON arrays. We specify the individual objects or arrays in the parameter and receive our merged JSON as result. For arrays, we check if the value is already there and if not, we add it. For objects, we check the values for each key. If it doesn't exist, we copy it over. If it exists, we check arrays and objects again, but other values just get replaced.

// merge two arrays
Dim j1 As New JSONMBS("[1,2,3]")
Dim j2 As New JSONMBS("[4,2,5]")


MessageBox j1.toString(False)

// merge two objects
Dim j3 As New JSONMBS("{""a"": 1, ""b"": [1]}")
Dim j4 As New JSONMBS("{""c"": 3, ""b"": [2]}")


MessageBox j3.toString(True)


Our CURLSMBS class can now pick the SSL backend. By default we use OpenSSL, but you can switch to SecureTransport on macOS or SecureChannel on Windows using SetSSLBackend method in CURLSSSLBackendMBS class, if you prefer the local SSL engines. We include the newer Apple IDN implementation for CURL, which we contributed to the project recently.

We also have a new property in the CURLMBS, CURLNMBS and CURLSMBS classes. This property with the name OptionForbidReuse, which is of type boolean, closes the next connection explicitly when the transfer is over. Normally, libCURL keep all connections alive when done with one transfer in case there comes a succeeding one that can re-use them. This option should be used with caution and only if you understand what it does. Set to false to have libCURL keep the connection open for possibly later re-use.


In the GraphicsMagick topic, we have a new method for each of the GM16ImageMBS and GMImageMBS classes. The flatten method, to flatten the alpha channel. So that we know which color should become transparent, we must first specify the background color.


We have also added new methods in the SortMBS module. The method AddArrayMBS adds the content of the second array to the first one. Both arrays are parameters of that method. Similarly, we have the method AddMBS.

If we want to copy the content of one array to another, we can use the CopyMBS method.

To check whether two arrays in a range are equal, we use the EqualsMBS method. The method returns true if they are equal in the given range.

We can also use the SortMBS method to sort an array in ascending or descending order. Whether the sort order should be ascending or descending is specified in the parameters.

Another cool new method is the SumMBS method, which sums all the values of an array or a specific range predefined in the parameters.

New functionalities for Mac

The MBS Xojo Plugins in version 24.2 offers some more new features for Mac users.

iOS Printing

A completely new feature in our plugin is now the possibility of a print dialog under iOS in Xojo. We provide a number of classes for this, which are collected in the topic Printing iOS. With the class UIPrinterPickerControllerMBS you can display a dialog in which we can select the printer we want to use for printing. In the class UIPrintInfoMBS you can then set some properties, such as duplex printing. You can print a document with or without dialog. We will show you how this works in the blog article: Print dialogs for iOS in Xojo.


With the QLThumbnailGeneratorMBS class, we have a class that generates thumbnail images based on provided requirements on macOS. The thumbnail is generated by the methods generateBestRepresentationForRequest and generateRepresentationsForRequest. The settings are passed in a QLThumbnailGenerationRequestMBS object and the processes in this class run asynchronously. For this reason, we receive an event generateBestRepresentationForRequestCompleted or generateRepresentationsForRequestUpdated after the thumbnail has been created. In these events we then find the information as QLThumbnailGenerationRequestMBS object with which the Thumpnail was created and also the Thumpnail as QLThumbnailRepresentationMBS object. The method generateRepresentationsForRequest from the class QLThumbnailGeneratorMBS generates various thumbnail representations for a file and calls the update handler for each thumbnail representation.

Mail/Message Compose

You can use our new MFMailComposeViewControllerMBS class in MBS Xojo iOS Plugin to let the user send an email message. A dialog pops up with prefilled text and attachments, so the user can edit the message and then send it using their mail account. More Informations about that you find in our blog article: Send email message in iOS Xojo App

Similar to the MFMailComposeViewControllerMBS class, we also have a class for sending messages. For example, you can send SMS or iMassagers. We also have a blog article on this topic: Send text message in iOS Xojo App.


We have received new events for the PHPickerViewControllerMBS class with which you can now react to even more actions. Take a closer look at our new events:


There are a few new methods for touches in the NSEventMBS class. You can now use the coalescedTouchesForTouch method to return all touch objects that contain a coalesced touch. In the same way, you can use the predictedTouchesForTouch method to return an array of all predicted touches objects. The method touchesMatchingPhase returns the touch objects associated with the specified phase.


We have a new class: NSPathControlItemMBS. This class is used to represent an individual path segment in an NSPathControlMBS. It allows to customize entries for the NSPathControlMBS control. You can then use the new pathItems method from the NSPathControlMBS class to get an array of all NSPathControlItems that are currently being displayed. In contrast, you can use setPathItems to specify which NSPathControlItems should currently be displayed. The clickedPathItem property can be a useful property in this context. This returns the NSPathControlItemMBS that was clicked. If none was clicked, this method returns nil.

New functionalities for Windows

Last but not least, we offer some more new features for Windows users:

Windows Display

For the WindowsDisplayMBS class, we now have the option of querying the height, width, scale factor and position of the display in the virtual desktop space in logical points.


In the WebView2 topic, we have two new propetries in each of the DesktopWebView2ControlMBS and WebView2ControlMBS classes. The HiddenPdfToolbarItems property Customize the PDF toolbar items. In this property you can sum up a combination of several numerical values to create a PDF toolbar according to your wishes:

Bookmarks256The contents button on PDF toolbar.
FitPage64The fit to width button on PDF toolbar.
FullScreen2048The full screen button on PDF toolbar.
MoreSettings4096The setting and more button on PDF toolbar.
None0No item. By default the HiddenPdfToolbarItems equal to this value.
PageLayout128The page view button on PDF toolbar.
PageSelector512The page number button on PDF toolbar.
Print2The print button on PDF toolbar.
Rotate32The rotate button on PDF toolbar.
Save1The save button on PDF toolbar.
SaveAs4The save as button on PDF toolbar.
Search1024The search button on PDF toolbar.
ZoomIn8The zoom in button on PDF toolbar.
ZoomOut16The zoom out button on PDF toolbar.

The other property is IsSwipeNavigationEnabled. It determines whether the end user to use swiping gesture on touch input enabled devices to navigate in WebView2.


One thing is also new with Linux. We have been integrating the GTKWindowMBS class into our plugins for many years. We can directly modify a window on Linux using this class. This class has now the new property XWindowID. With this property we can query the X-Window ID for the window.

We hope you will also find some interesting new features. We wish you a lot of fun with MBS Xojo Plugins version 24.2. If you have any Ideas for new cool features, need a license or have any questions, please contact us.

23 05 24 - 16:36