Since Apple started to add their own “Enter Full Screen” menuitem on El Capitan, I’ve stopped adding my own. The trouble is that Apple’s is missing the key combo. If I add my own back to get the Key combo, I end up with duplicates.
I see that Xojo doesn’t have duplicate menu items and have the key combo, I wonder who else does and how did you accomplish it?
Nothing really
In the IDE set the window to have a full screen button
Added a menu item to our View menu
Set the text to be “Enter Full Screen” with the short cut & we’re off
No declares or anything
Do anyone have a way of having only some windows full screen yet?
If the main document window is full screen and you display a modal dialog that is smaller, it is made full screen by OSX
Looks %&* so I have disabled full screen in my app.
[quote=262931:@Norman Palardy]Set the text to be “Enter Full Screen” with the short cut & we’re off
No declares or anything[/quote]
Huh!
I see, I inject a menu item using code (as part of my own AppKit). So obviously Apple check to see if it’s there before the open event of my application is called.
It’s nice that they do this and we don’t need to worry, it’s just annoying that it’s missing the standard keyboard shortcuts.
In Firefox (OS X), I use cmd-shift-f and get the full screen for the frontmost window. This is a toogle function: another cmd-shift-f left the full screen mode.
I do not have handly my WIndows 10 laptop (I forget to take it with me), so I cannot comment for Windows 10.
Also, in one of my Xojo applications, I needed full screen mode and I have it (using the same cmd-shift-f toogle).
In the MenuItem Handler:
[code] If Self.FullScreen Then
Self.FullScreen = False
Else
Self.FullScreen = True
End If
Return True[/code]
The MenuItem text is Full Screen Mode
The applicaton is build with Xojo 2015r1.
When the MouseCursor is at the MenuBar location, the MenuBar appears and when I left that monitor area (after time) the MenuBar hides (but I didnt do anything for that).
Sorry if I misunderstand something in the op question.
I see, I inject a menu item using code (as part of my own AppKit). So obviously Apple check to see if it’s there before the open event of my application is called.
It’s nice that they do this and we don’t need to worry, it’s just annoying that it’s missing the standard keyboard shortcuts.[/quote]
Yeah there seem to be several they look for
And they seem to look for them differently
Joe knows more about this than I do
Like I said in our case we set it up with a menu item short cut & there it is short cut & all
And, on targets where it does NOT apply we remove it
I know it’s marked as Fixed now, but the Feedback app has two Enter Full Screen menu items.
Maybe it might be of use to know how it was fixed and why it was broken as it sounds like a related issue.
[quote=262932:@Jeff Tullin]Do anyone have a way of having only some windows full screen yet?
If the main document window is full screen and you display a modal dialog that is smaller, it is made full screen by OSX
Looks %&* so I have disabled full screen in my app. :([/quote]
There’s a Feedback case. Not at my computer right how to give you the case number. But I agree with your assessment.
Did a quick Feedback search, but couldn’t find anything relative; I didn’t quite understand Jeff’s post, so glossed over it. However, my current app is being designed to used in Full Screen, so I’d like to get a better understanding.
[quote=262932:@Jeff Tullin]Do anyone have a way of having only some windows full screen yet?
If the main document window is full screen and you display a modal dialog that is smaller, it is made full screen by OSX
Looks %&* so I have disabled full screen in my app. :([/quote]
Are you saying that this occurs with the MessageDialog class when used in Full Screen and not as a sheet, or a window who’s frame is set to Modal dialog?
This doesn’t surprise me at all. I was trying to make sure that my keyboard combo’s match up with Apple apps, to find that the keyboard combo cmd-opt-t doesn’t work at all, just beeps at me, no matter what application I’m in. I’ve double checked the System Preferences incase there’s something else stealing the combo and can’t find anything.
I guess I should file a radar, but quite frankly am shocked by such a glaring bug (unless it’s something local to my machine).
I see the problem. Unselecting “Resizable” & “Maximize Button” in the IDE seems to prevent the second “Moveable Modal” window from auto-entering Full Screen.
I created a demo project, where Window1 has the Full-screen button selected and a generic push button with “Window2.showmodal” in the action event.
Window2’s type is “Movable Modal” and also contains a cancel pushbutton with the code “self.close”. The Window property “Visible” is set to false and so is “Close Button”, “Resizable”, “Maximize Button”, “Minimize Button” & “Full-screen button”.
In addition to Norman’s comments, the “Enter Full Screen” issue was filed and addressed as <https://xojo.com/issue/40673>.
The extra item is being put there by the OS. It scans the View menu for an item with its action set to something like toggleFullscreen: and inserts it if absent.
Starting with Xojo 2015r3, the framework will detect menu items that have their text set to “Enter Full Screen”, “Exit Full Screen”, or the localized equivalents, and set the NSMenuItem’s action such that AppKit won’t insert the second item.
Which is what mine does, it just dynamically adds the menuitem on app.open event. I’m guessing this is where the problem lies. I’ll experiment with adding a menuitem to the menu with the text “Enter Full Screen”.
In my notes; I do have some declares for using NSUserDefaults to disable the Full Screen menuitem, however my notes indicate that app.open event is too late in the process, so the system appends it for the first launch of the application.
Late to the party … but I discovered if you have a Top Level Menu Item named “VIEW”… macOS will add the “Full Screen” menu item automagically… HOWEVER… If you name the menu "VIEW " instead… it looks the same, but the item is NOT added.