Can't get MenuBar to work with SnowLeopard

Questions regarding syntax

Can't get MenuBar to work with SnowLeopard

Postby bobr » Tue Sep 13, 2011 8:06 pm

Try as I might, I can't get menubar to work on OSX 10.6.8

I've tried running the MenuBar example code. This loads and runs o.k. but no menu items appear. I get the project window and a Form1 window but no menu items. What am I doing wrong. I know it all has to be hand coded, but the hand coding produces nothing.
bobr
 
Posts: 31
Joined: Fri Mar 18, 2011 10:30 pm

Re: Can't get MenuBar to work with SnowLeopard

Postby gbison » Wed Sep 14, 2011 7:11 pm

Wish I could help you Bob but i know nothing of Mac, Slowdown will be the man to talk to on this one. ;)
"The greatest trick the devil ever pulled was to convince the world he didn't exist" . ;-)
gbison
 
Posts: 29
Joined: Fri Feb 04, 2011 8:16 pm
Location: USA

Re: Can't get MenuBar to work with SnowLeopard

Postby Slowdown » Thu Sep 15, 2011 9:06 am

@bobr,
You probably have manually created project.
You have to change the properties of your project,
properties_1.png
properties_1.png (27.35 KiB) Viewed 2019 times

then,
properties_2.png
properties_2.png (74.42 KiB) Viewed 2025 times

Change it to > With MDI MainWindow (you must have myMenuBar created)
must be honest never used the menubar.

@gbison
:oops:
Regards
Slowdown for now i'm back
Slowdown
 
Posts: 347
Joined: Sat May 02, 2009 6:48 pm
Location: Netherlands

Re: Can't get MenuBar to work with SnowLeopard

Postby gbison » Thu Sep 15, 2011 5:21 pm

@gbison:oops:


Come to think of it neither have I.....LOL
"The greatest trick the devil ever pulled was to convince the world he didn't exist" . ;-)
gbison
 
Posts: 29
Joined: Fri Feb 04, 2011 8:16 pm
Location: USA

Re: Can't get MenuBar to work with SnowLeopard

Postby bobr » Thu Sep 15, 2011 8:47 pm

Yes, that's how I've got the project set. That or SDI. Makes no difference, it doesn't display a menu with either setting.

Works O.K. under Windows and Linux but NOT under OSx. If you've got a MAC, try running the MenuBar example. It doesn't display a menu, at least, not on my machine.
This is what I see:
Screen shot 2011-09-15 at 21.32.03.png
Screen shot 2011-09-15 at 21.32.03.png (19.39 KiB) Viewed 1983 times


Under Linux I get this:
Screen shot 2011-09-15 at 21.40.11.png
Screen shot 2011-09-15 at 21.40.11.png (22.81 KiB) Viewed 1988 times


Any other suggestions?
bobr
 
Posts: 31
Joined: Fri Mar 18, 2011 10:30 pm

Re: Can't get MenuBar to work with SnowLeopard

Postby Slowdown » Fri Sep 16, 2011 6:27 am

Hi bobr,

result of your code,
MenuBar.png
MenuBar.png (35.89 KiB) Viewed 1972 times

i think you look at the wrong place.
Regards
Slowdown for now i'm back
Slowdown
 
Posts: 347
Joined: Sat May 02, 2009 6:48 pm
Location: Netherlands

Re: Can't get MenuBar to work with SnowLeopard

Postby bobr » Fri Sep 16, 2011 9:05 am

Thank you so much. Yes, of course.
I was looking in totally the wrong place for the menu. I had done my original work using Windows and had assumed that the menu would appear in the same manner on the MAC. I NOW understand Bernard's note about a single menu system with Qt under OSX. In fact, the more I think about it, the more obvious it is - that's how all menu's work on the MAC!
;)
bobr
 
Posts: 31
Joined: Fri Mar 18, 2011 10:30 pm

Re: Can't get MenuBar to work with SnowLeopard

Postby Slowdown » Fri Sep 16, 2011 9:29 am

Hi, you're welcome :D
Regards
Slowdown for now i'm back
Slowdown
 
Posts: 347
Joined: Sat May 02, 2009 6:48 pm
Location: Netherlands

Re: Can't get MenuBar to work with SnowLeopard

Postby bobr » Fri Sep 16, 2011 10:33 am

There is, however, one thing that doesn't appear to work with the MAC.

Looking at the example code:

Dim item As MenuBarItem = MenuBar.MenuBarItem("MenuBarItem0")
item.Enabled = Not item.Enabled

This fails to disable the menu item. To handle this (which is not wholly satisfactory) you have to do this:

Dim item As MenuBarItem = MenuBar.MenuBarItem("MenuBarItem0")
item.Visible = Not item.Visible

- which does work.
bobr
 
Posts: 31
Joined: Fri Mar 18, 2011 10:30 pm

Re: Can't get MenuBar to work with SnowLeopard

Postby berndnoetscher » Mon Sep 19, 2011 7:34 am

Slowdown wrote:Hi bobr,

result of your code,
MenuBar.png

i think you look at the wrong place.


Thanks slowdown for your help. You saved me some time :-)
berndnoetscher
Site Admin
 
Posts: 1059
Joined: Tue Sep 25, 2007 9:37 am


Return to Coding Questions

cron