Problem with MenuBar

Questions regarding syntax

Problem with MenuBar

Postby EasyCoder » Thu Dec 08, 2011 7:21 pm

Hi All,

After some head scratching I finally managed to add a menu bar to my program. However, there are a few problems.

1 - Adding a menu bar causes the program window to be bigger than you designed it. This leaves blank areas to the right and bottom of your program main window. Is there any way to stop this as it looks awful. (I've set the project type to "With SDI mainWindow")

2- The onEvent function of child menu's don’t work. Nothing happens when you click on a child menu. Normal top level menu seems to work fine. Is there something I am missing or is there something I need to set to make the child menu onEvent work.

I would appreciate any help this.

Regards,
EasyCoder.
EasyCoder
 
Posts: 13
Joined: Tue Nov 22, 2011 7:09 pm

Re: Problem with MenuBar

Postby bobr » Thu Jan 26, 2012 1:02 pm

In response to your problem with the child menu not appearing to create an 'onEvent', I'm having the same problem. It works fine under OS-X but not under Linux.
Can one of you clever fellows out there respond to this please? Under OS-X the menu bar has to be hand coded, so that's what I've done. Is there some difference in the code generated when using the IDE to create the menubar code under Linux? I'm trying to use the same source code for both operating systems.
Incidentally, using the same source code presents other problems because the file path to image files differs under different systems. Is there some way of setting a default location for these files - like within the project folder - that would be rather nice!? It appears that all file paths have to be absolute, not relative.
bobr
 
Posts: 31
Joined: Fri Mar 18, 2011 10:30 pm


Return to Coding Questions

cron