Without getting deep into the glory details (though I’m sure Julian may attempt to as he’s a smart guy) but there’s nothing “weird” about it from a Xojo perspective. Your z-order (i.e. drawing order) follows your control stack on your window layout. It’s however, completely backwards on Windows when dealing with Win32 controls that are not transparent (yes WS_EX_COMPOSITED would help, but note the caveats, rabbit hole, rabbit hole, etc.). The fortunate part of this is with our move away from transparent controls we can start ordering them the “correct” way on Windows. As of now the z-order only matters for actual Win32 controls and only when you try to overlap them (but why would you want to do that). Of course, when we start taking away transparent controls I’m sure someone will attempt something like this:
And complain that we totally got our z-order wrong as well ![]()