toolbar not showing in sheetWindow in 2019r1

I have an old project showing a toolbar in a sheetWindow.
Running Xojo 2019r1, the sheetwindow does not show anymore the toolbar.
I tried setting the, height, width, visible, transparent etc., yet the toolbar does not show.

BTW: also a new project with window1 showing window2 (sheetWindow with a toolbar) does not show it.

Any idea how to fix it? Thank you.

Are you sure sheetwindows with toolbars were ever supported by the OS? I mean Xojo may have allowed it; but I don’t recall actually seeing this in use elsewhere.

You may have to use a fake toolbar going forwards.

Seeing this thread, I checked my own projects for this issue. You’re true, 19r1 compiled projects (or in debugger as well) doesn’t show the toolbar in sheet windows.

Me, I also need to revise my projects with this issue showing up.

Would be straightforward just to change the window frame when possible.

@Sam Rowlands
Yes, I knew that having sheetwindows with toolbar was not common, but for a specific app of mine, well, it was handy.
Thank you.

in documentation there nothing that says that you can’t use, or even avoid, them.
Yes they are uncommon but in some cases they are really useful.

And since there is nothing about this and moreover breaks a lot of code it’s a bug.

That’s not necessarily true. When we updated from the 10.9 macOS SDK to 10.14 in 2018r4 there were several things that no longer worked properly. One thing that comes to mind which didn’t make it into the r4 release was an issue with sheets which caused them to be translucent in dark mode. The solution was to bring them up to date, taking all of the OS changes from 10.9 through 10.14 into account. My suspicion is that Apple dropped this option somewhere over the last five years and we’re just seeing it now.

I’m traveling to XDC today but if I have a chance to look at your case, I’ll see what I can find.

So there is still some hope. Thanks.

pretty sure toolbars can only be attached to “titled windows” which a sheet isn’t

I see - windows that holds a title bar :slight_smile:

as far as I can tell thats the criteria

try one on a plain box window as well and see if it shows - it may not

This is why I created my ToolBarContainer that lets me have a ToolBar that appears properly on any window type on any supported platform.

Sometimes, the design element is more important than some tech writer’s idea of “standard”.

Re-reading my comment; I think I came off a bit snobbish. That wasn’t my intention and I have no desire to change the look and feel of your application, my personal feelings on this are that Apple may have never really supported this and now they’ve changed something (probably for Marzipan) and that functionality has gone.

IMHO going forwards; you may want to look into faking a toolbar; or if your functionality is light enough; you could probably get away with using a SegmentedControl.

Ok, so I’ve looked into this and as I suspected the change we made which turned off the TitledWindow flag was necessary to have sheet windows to continue to be modal, opaque and able to have a background color under the macOS 10.14 SDK.

and maybe that is the correct configuration for them where the old one saying they were titled was wrong
hard to say for sure since the SDK changed so dramatically in between as well

So, since there is no way back and sheetwindows will not show toolbars, I keep what meanwhile I had done.
That is: the former sheetwindow becomes a Movable Modal, so that users cannot access (click, edit items etc.) the parent window.
theWindow.isMovable = false// so that it goes around with the parent

and then I set its top and left so that it shows just below the parent’s title and centered in the parent.

And of course, I tried hiding the title, but what happens is that the toolbar, although it remains visible, gets crippled, showing only the various buttons icons without their labels, and with no even space between the buttons. So, it is a no no. Title-bar is a must.

Will take more code, but why don’t you use a bunch of Canvas and create your own ToolBar (if you do not need anything “fancy”) ?

Or use some third party ones ? (if they works on these conditions)…

Emulate a toolbar is not a problem.
Anyway since I have to create an update for an app and this app need this feature I have to choose to remain with pre 2019 (strict budget to change unexpected things)

I will check if I can find a solution.
in any case you can create sheet window (no title) with toolbar in Xcode (modal). The problem here is relative to other Xojo feature, and I can understand this.

@Antonio Rinaldi [quote]Emulate a toolbar is not a problem.[/quote]

Agree, but it may take some time to have a toolbar that acts exactly as the built-in one.
At present I was thinking of a rudimentary one consisting of x canvases as background buttons ( lightgray when disabled and deeper gray when “pushed”), and to use pushbuttons (gradient) to display the images (via MacOSLib).