Gap between Toolbar and Controls


I noticed I have a bit of issue and I’m not sure whats causing it.
When I first open my app there is a rather big gap between the toolbar and the controls below.

Here is how it looks in the IDE -

Here is what it looks like when it first opens

and here is what it looks like after it opens and I adjust the size of the window. The controls go
to where they should be.

I’m a bit puzzled by this. When the app opens it should look like the 3rd pic.


Mac OS 12.3
XOJO 2022 R1

In the open event of your window, include some code like

me.height = me.height + 1
me.height = me.height - 1

The reason for this weirdness is that window properties are being adjusted (maybe after the window is initialized), if you do not have any declares or plugins, then I suspect it might be the Xojo framework setting the toolbar style to adopt the Catalina (and below) style, instead of allowing the window to use the OS specified style, which in this case is the iOS Big Sur style toolbar.

Cool that worked.

Nope no declares or plugins. Yeah I thought that was a bit weird.


1 Like