Why doesn’t Xojo (a Cocoa app) have full screen mode support and the ability to add full screen mode to apps written in Xojo?
Because its focus is cross platform?
To enable FullScreen in a OSX Cocoa app, you can use MBS Plugins like this:
// Enable FullScreen Button on Toolbar,
// if we are on OSX 10.7 or Higher
Dim major, minor As Integer
If System.Gestalt("sys1", major) Then
If System.Gestalt("sys2", minor) Then
If major>=10 And minor >=7 Then
// Enable FullScreen switch for OSX
Self.FullScreenPrimaryMBS = True
No need to use MBS for this one, there is an example fullscreen project in Examples > Platform-Specific > OS X > FullScreen.
I agree with Shane the Xojo MacOS IDE could go full-screen without affecting their cross-platform code. BTW I use the MBS code for my apps and if works well, I’m just confused re what command-key to assign it since Apple is inconsistent themselves!
There are some minor issues with Full Screen apps that Xoko are working on before enabling the full screen IDE.
Correct you are Sam
While you can use a declare to make the window go full screen there are a few issues we know about.
And they ONLY happen when you try to go full screen.
Since we build Xojo with Xojo until we get this fixed & fixed properly we have not made it possible to go full screen in the framework.
Once we do it will work in the Xojo IDE & it will also work properly for your applications.
Looking forward to having the Full Screen issues resolved.
At the moment full screen is a bit of a hindrance because of how it works with secondary monitors
But I understand that’s about to change with OS X so getting this fixed in the framework would be nice
Thanks for all the replies!
Excited that Xojo will eventually get OS X full screen support. I use full screen in nearly all my apps besides text editors / Sublime Text.
I copied from the xojo example into my test project … worked like a charm. Thanks
Watch out for mouse events in custom controls when the window first goes full screen, you don’t get any… A workaround is to use a timer. Once the menubar has been shown, mouse events come back.
Thats the exact bug we need to resolve before we feel its ready to release as part of the framework
The issue we had is that most times the workaround Sam posted works around it - but not always - and thats why we haven’t used it or released it.
I have an interesting one on this, using the MBS Lion plugin and setting up for full screen, when I take the window fullscreen, the Toolbar goes from the metal gray to white, looks weird. Anyone else seen this?
Not seen that one, one issue I had was that I wanted to replace the default toolbar with a custom when the window went full screen and I couldn’t figure out how, hiding the toolbar had no effect. So I ended up using a custom toolbar throughout, it also actually helped me with some of the interface design.
You may want to ask Christian about this directly.
I have just done that, Joe.
Oddly enough, if I run the app as Carbon, it shows up as Gray, just not in Cocoa. This app started life in 2012 so wonder if I have a hangover. I feel a test project coming on.! Thanks
Well, changed the full screen code to use the Xojo example and exactly the same thing happens. The window just has a listbox to the left, and a canvas to the right, but as soon as I go full screen, toolbar background goes white.
If I create Vanilla apps, all is well, so something in my app is interfering with this, doesn’t matter whether it’s the Xojo sample code that does the job, or the MBS plugin.
I recreated the Toolbar from fresh as well. Sigh!
Cocoa build. If you change the Window Background to Custom Color, any color of your choice, then when you full screen the app, the Toolbar will also change to that color. Methinks this is a bug. If anyone agree’s, I’ll do a feedback.
What say the real experts?
Sounds like a variation of <https://xojo.com/issue/12031> which happens on Win32 builds?