Page 1 of 1
					
				Determining if menubar is visible
				Posted: Sun Aug 11, 2024 2:37 pm
				by DarkKnight
				How do I determine if the menubar is visible?
using "the visible of the menubar" does not work
			 
			
					
				Re: Determining if menubar is visible
				Posted: Sun Aug 11, 2024 4:09 pm
				by Klaus
				In the IDE or standalone?
Mac or Windows?
While a (system) menubar is always visible on a Mac, you may want to check for the RevMenubar in the IDE:
Code: Select all
put the visible of stack "revmenubar"
 
			
					
				Re: Determining if menubar is visible
				Posted: Sun Aug 11, 2024 9:26 pm
				by DarkKnight
				In the IDE on a Mac.  Checking the visibility of the revMenubar stack doesn’t work.  It returns the same result when the menubar is hidden as it does when it is visible.
			 
			
					
				Re: Determining if menubar is visible
				Posted: Sun Aug 11, 2024 9:38 pm
				by Klaus
				Are we talking about the same thing?
See screenshots, one with "Toolbar text" (= stack "revmenubar") shown and one without.
 
			
					
				Re: Determining if menubar is visible
				Posted: Sun Aug 11, 2024 10:11 pm
				by DarkKnight
				No we aren't.  I'm referring the actual Mac OS menubar that is hidden/shown with "hide menubar"/"show menubar".  Is there a way to determine if it is visible or not?  In SuperCard it was possible to "get the visible of the menubar", but I haven't been able to find something similar in LC.
			 
			
					
				Re: Determining if menubar is visible
				Posted: Sun Aug 11, 2024 11:51 pm
				by bn
				Hi,
I tried to use the working screenrect to determine if the Mac menubar is visible or not.
On my MacBook Pro with a "notch" (where the camera is) it changed from
Code: Select all
on mouseUp
   hide menubar
   put the working screenrect
end mouseUp
Code: Select all
on mouseUp
   show menubar
   put the working screenrect
end mouseUp
Visible:
0,
38,1728,1117
Hidden
0,
32,1728,1117
So the top (item 2 of the working screenrect) changes.
Maybe that helps
Kind regards
Bernd
 
			
					
				Re: Determining if menubar is visible
				Posted: Mon Aug 12, 2024 1:04 am
				by DarkKnight
				Yes that does help.  On a desktop with no notch, the working rect is 0,23,2560,1080 when the menubar is visible and 0,0,2560,1080 when it is hidden.
So if the working screenrect = the screenrect then the menubar is hidden, on a display without a notch.