GroupBox diff between Mac and Windows

I find a stark difference between Mac and Windows when it comes to GroupBoxes. This is especially apparent in Dark mode. If you create a Window, and put a GroupBox on it with no caption, and put it at Left=32 Top=32, on Windows it definitely doesn’t look like the GroupBox is the same distance left as it is from the top. I’m sure that’s because once there is no caption, the top of the GroupBox isn’t set at relative 0 but at like 12 or 16. But Mac it’s not like that, it’s way more even. This makes it quite hard to get clean results when doing cross-platform apps. Does Xojo know about this?

That’s just a difference in how the native controls behave in those situations, I believe. It’s not uncommon for the control metrics to be slightly off for different versions of the same platform OS as well.

I “suppose” so =) I guess this evolves into the basic argument between “hey we use native controls” and “build for both platforms with ease”. In a perfect world it’d be nice if Xojo under the hood intervened and made them equivalent so no extra coding had to take place.

I figured this out: Let’s only concentrate on a Window that has a decorative GroupBox as a boundary that is 16px inside the Window. (That’s typical design.)

Mac Frame: +0 adjustment
Win Frame: -8 adjustment
Mac Objects inside GroupBox: +4 adjustment
Win Objects inside GroupBox: +2 adjustment

Given a Method that makes these adjustments, they look centered and margined for both Mac and WIndows.

And then Linux is different still.

1 Like