Skip to content

Author: Paul Lefebvre

Folder Contents in a Menu

A user on the forum asked how they might show folder contents in a PopupMenu. Since a PopupMenu is not hierarchical, that wasn’t really an option. But an alternative would be to show the contents in a hierarchical menu. Here’s how you can recurse through files and add them to a regular MenuItem.

Comments closed

Use Multiple CPU Cores with Worker

A Worker provides a way for you to have code that runs on multiple CPU cores. A Worker achieves this by running its code in a Console app. One or more of these console apps are started based on your Worker settings. Since these run as Console apps, the OS treats them as separate processes and spreads them out amongst available CPU cores.

Comments closed

Top-Rounded Rectangle

On the forum a user asked if there was a way to create a rectangle with only the top left and top right corners being rounded. Xojo’s built-in RoundRectangle control draws with all four corners rounded, so that was not an option.

One solution is to use a GraphicsPath to draw exactly what you want. With a GraphicsPath you can use the AddArc() method to add rounded corners and then draw the lines for the rest of the rectangle.

Comments closed