Following on from this (solved) post, I have a toolbar on my window and, using declares, have set the toolbar style to “unified compact” and the window’s mask to “full size content view”.
The issue I’m having now is I don’t know how tall the toolbar is. When designing the window’s layout in Xojo’s layout editor, I just have to guess where the top of the content is:
I can’t put my content at the top of the window as seen in Xojo’s IDE because then the content overlaps the toolbar (since I’ve altered things with declares).
Rather than hard code a value for where the actual bottom of the tool bar is, is there an accessible property of the toolbar I can use? Using the toolbar’s height gives 0 that doesn’t work. I asked ChatGPT and it suggested using the visibleHeight property of NSToolbar so I’m guessing there is a way to get this information with declares.
Var compensation As Integer = display.displayAt(0).Height - theWindow.bounds.Height
This give the remainder of the display size, maybe you can get the content height trough window.height and compare that with “compensation” ?