Skip to content

Author: Paul Lefebvre

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

Doing Progress Right

The ProgressBar control and loops go hand-in-hand. If there is a ProgressBar on a Window, you can bet a For loop is close by. But there are right and wrong ways to do this, and most of the time I see progress code, I see the wrong way.

Comments closed

Non-Visible Characters in Strings

As a follow-up to our post on Escaping Quotes in Strings, someone asked how they might deal with something such as the tab character in a String. Unlike with a quote, dealing with a non-visual character (such as a tab or end-of-line) in a String is trickier because you can’t actually type those characters. So instead you have to refer to the character another way.

Comments closed