So we want to use this, but not call it for every event as building an array and color objects costs a little bit performance for each draw. The NSColorMBS.alternatingContentBackgroundColors function returns an array with two NSColor objects with the current preferred background colors for lists. In MBS Plugin we got last summer the dark mode additions for NSColorMBS class. Returns that DataSet at the specified index. DataSet ( index as Integer ) as GraffitiChartDataset. If newIndex is less than zero, the item is appended to the end of the array. So we like to optimize the handling and cache the colors. AddDataset ( newDataset as GraffitiChartDataset, newIndex as Integer -1 ) Adds a the provided dataset at the position signified by newIndex. Updated NSOrthographyMBS, NSLinguisticTaggerMBS, NSLinguisticValueMBS and NSTextCheckingResultMBS for iOS. As CellBackgroundPaint event in the Listbox class is called for each cell, it can be called 100s of times just for redrawing the list once. New in this prerelease of the 21.1 plugins: Added NSDataDetectorMBS and NSRegularExpressionMBS classes for macOS and iOS. Or you check with IsDarkMode function every time you draw something and decide the color. As we are getting closer to XDC 2019, new conference videos are on the horizon We are now offering some great pricing on the XDC 20 videos Between now and XDC (May 1, 2019), you can get the XDC 2016 video set for 75 and the 2018 video set for 99 Product: XDC Videos. Xojo 2018r4 has the AppearanceChanged event for Application class, which is very handy to switch colors. So we needed a good solution for the project. And while the average user never switches the setting while using the application, the beta testers of course do that. But that is not perfect with a fixed color for switching between light and dark mode. You may change a color in your code or by asking the user to select a color. We used to have the usual code with "row mod 2 = 1" and picking a color for the every second row. By default, you should see a window with two distinct areas. Alternating row colors for Dark Mode We ported a bigger Xojo project to MacOS Mojave recently and in that process needed a good solution to update our alternating row colors for the list boxes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |