Escaping sheet

How can a sheet escape? User sent me this screenshot:

I made him a test version to check the screen id of main window and sheet. I can see that in the middle of doing things the sheet window changes the screen.

Xojo 2020r2.1 and 2019r3, macOS Catalina. I can’t reproduce the problem with High Sierra.

How can I reunite the sheet with the parent?

By modifying the frame of the sheet or by overriding an event on the window where the OS asks for a frame rect in which to display the sheet.

I’m guessing if you’d performed the latter you’d probably know about it as it cannot be done with native Xojo.

Also consider the following:

  • Make sure you’re not trying to adjust the size or location of the sheet window in code.
  • Make sure you’re not trying to use the same sheet window across different windows.
  • Make sure that the window in which the sheet is attached too, does not get hidden (window.hide) this causes weirdness to happen.
  • Tell the customer to reboot his Mac, this simple trick makes 80% of weird issues go away.

Beatrix … I am in total shock… you are … are … using non-color/blackwhite toolbar icons? WTF …

Sorry… couldn’t resist. Made my day. :wink: :wink: :wink: :wink: :wink:

1 Like

@ChristopheDV : you jokester. The icons are in disabled look because the sheet is showing. :grinning:

@Sam Rowlands: sigh… This is a garden variety sheet shown with ShowModalWithin.

  • Changing size of window: have been doing that since forever. The progress window shows the current mailbox path. If you have a long mailbox path then the app changes the height of the window.
  • Nope, only using one window.
  • Okay, good to know.
  • The user said that he has the problem for a longer time. I’ll assume that he has rebooted.

Whenever the mailbox changes the height of the window is recalculated. The user said that at sometimes then the sheet escapes.

So moving the sheet back is not a good idea?

Or simply power off! This is much trickier, makes 100 % issues go away :wink:

She used a bad photo.

Beatrix, use a grüne photo, the sheet will not complain and stay in place (instead of going away) :wink:

All the Sheet windows incorporated in my applications are also movable freely around.

If you say you can’t reproduce this with High Sierra, then probably this is a Movaje and up problem.

What are people doing that allows the sheet to be moved around?


Noth’ that I know about.

At my end, this happens with Sheet windows containing Toolbar items.
The project seen above is the last one that still needs to be converted to newer Xojo versions,
removing Toolbar items from Sheet windows (no longer possible with recent Xojo due to framework reasons), and probably going away from Sheet windows as well.

hmmm… While I have to confess that I’ve never tried to use a Toolbar on a sheet, I am not sure this is it as I don’t see @Beatrix_Willius using a Toolbar there.

I’ll admit that it might be more than one thing causing this issue.

While you may no longer be able to use the Xojo Toolbar in a sheet window, you can ‘roll’ your own pretty easily, with a canvas, some duct tape and black jacks.

Is your window set to “Sheet” in the Xojo IDE?

Yes, it is. And you’re right, on the Willius screenshot I don’t see toolbar items as well.

As said, I’m working on a Xojo 2020 version of this project, either removing Toolbar items from sheet windows or re-thinking about them, as you wrote, with Canvas items.

The sheet windows used in my projects, that doesn’t have a toolbar, are not movable around.
My example seen above has been made with a Xojo 2018 version.

Probably the issue seen above results from a combination of macOS version used + older compiler (framework version used).

Did some screensharing this morning with another user. The user had 2 screens and there, too, the sheet window was not on the same screen as the main window. Sugar!

1 Like

Did you check the logs? I added a sheet window to my debug builds to test it more easily, and when it opens I will see this in the messages pane:

Attempting to show sheet window ‘Virtueller Kontrollstreifen (VCS)’ with no parent

I know you do have a parent window, but I encountered some weird parent misassignments in sheet windows myself which I could alleviate by setting the parent on global app level.

Yup. There I could see that the sheet window moves back to the main screen. However, checking that the window still has a parent is a good idea. As with everything even a measly progress window is nowadays complex: pagepanel with 3 panels, can change its height and so on.