PushButton not showing in Dark mode on Mojave when PushButton.Default = True

I’m not sure what’s causing this but I have a couple of windows in my app that won’t show the PushButton when PushButton.Default = True when the app is running on Mojave in Dark mode - only occurs the first time the window is shown/created. If the window is hidden and re-shown the problem isn’t there.

I can reproduce the issue on my system for one of the windows. To fix it I simply hide and show the window again when app is running in dark mode and all is good. For the other window this problem only occurs for one of my beta testers. Hiding the window and reshowing doesn’t fix the issue. Short of setting the PushButton.Default to false in dark mode and accepting enter keys in the window KeyDown event handler has anyone else seen anything like this or have any suggestions?

Thanks,

Mark

Dev system: macOS 10.13.6 Xojo 2018r3
Test system macOS 10.14.4

I just checked some apps of mine using PushButton.default= true, but I cannot reproduce the problem you are facing.
macOS 10.14.5
Xojo 2019r1 and 1.1

[quote=441071:@Mark Franken]I’m not sure what’s causing this but I have a couple of windows in my app that won’t show the PushButton when PushButton.Default = True when the app is running on Mojave in Dark mode - only occurs the first time the window is shown/created. If the window is hidden and re-shown the problem isn’t there.

I can reproduce the issue on my system for one of the windows. To fix it I simply hide and show the window again when app is running in dark mode and all is good. For the other window this problem only occurs for one of my beta testers. Hiding the window and reshowing doesn’t fix the issue. Short of setting the PushButton.Default to false in dark mode and accepting enter keys in the window KeyDown event handler has anyone else seen anything like this or have any suggestions?

Thanks,

Mark

Dev system: macOS 10.13.6 Xojo 2018r3
Test system macOS 10.14.4[/quote]
Build with 2018r4 or higher. We had the same problem with the 2018r3 IDE.

@Greg O’Lone - Thanks. Unfortunately I currently can’t go past 2018r3 as I need the build to use the 10.13 SDK. I need this so that I can wrap my app bundle with some software that currently doesn’t like apps created with the 10.14 SDK (I know Xojo doesn’t support this kinds of thing)

Hopefully I can update soon to fix this issue.

Thanks for letting me know.

If you’re using 2018r3 its using the 10.9 SDK

Okay thanks Norman

Hmm… hasn’t the workaround for 2018r3 been something like this?

  • don’t set PushButton.Default = true in IDE’s Layout Editor
  • set PushButton.Default = true in Code, once the Window is shown