PureBasic Forum
http://forums.purebasic.com/english/

Menu location ...
http://forums.purebasic.com/english/viewtopic.php?f=15&t=70832
Page 1 of 1

Author:  HarrysLad [ Thu Jun 07, 2018 12:44 pm ]
Post subject:  Menu location ...

I've noticed that in Ubuntu 16 my app's main menu is located on the desktop's main menu (like macOS) but, in Ubuntu 18 it's on the app itself (like Windows).

No doubt just more stupid Linux/newbie questions but ...

Can I code to position the app's menu in the desktop's bar when using Ubuntu 18?
Can I program the location of the app's menu - desktop or app?
If not, can I determine (programmatically) where the menu is located ... and also, if its in the app, discover its height so that I can resize the app appropriately?

TIA
Dave

Author:  Trond [ Thu Jun 07, 2018 2:32 pm ]
Post subject:  Re: Menu location ...

This depends on the desktop environment. Try MenuHeight(), it should return 0 when the menu isn't inside the the application window.

Author:  HarrysLad [ Fri Jun 08, 2018 2:01 pm ]
Post subject:  Re: Menu location ...

Trond wrote:
This depends on the desktop environment. Try MenuHeight(), it should return 0 when the menu isn't inside the the application window.


Thanks for that. I read about the MenuHeight() function in the PB help-file ...

"Linux & MacOS X: This command will always returns 0, as the menu bar isn't part of the window (it is always located on the main bar at the very top of the screen). Therefore MenuHeight() can be used seamlessly on every OS to adjust the window size depending on the actual menu height."

... and believed it! :oops: It may be true of MacOS but not necessarily true of all flavours of Linux.
Now we know better.

Problem sorted now so thanks again,
Dave

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/