View topic - Create menu structure for PtWindow

Create menu structure for PtWindow

anything that doesn't fit to other groups.

Create menu structure for PtWindow

Postby Elmi » Wed Mar 31, 2010 3:34 pm


I want to create a simple menu for a PtWindow-widget:

A menubar that contains two menus (e.g. "File" and "Info"). Every menu itself contains at least one menu item (e.g. "Open", "Save" and "Exit" for the "File" menu).

The QNX documentation tells me something about a PtMenuBar: ... nubar.html

According to that description such a menu bar can contain my menus "File" and "Info" as PtMenuButton, these buttons itself can contain the menu items as PtMenu. When I add the PtMenuBar to my PtWindow it looks like it could work.

But when I look at ... tmenu.html there is an example that doesn't uses a menubar but a PtGroup.

The bad thing is: both methods do not work for me, my menubar can hold only one menu (the last one that uses the menu bar ar parent), when I use the PtGroup only and add it to my window the nice-looking has gone and the menus overlap each other and when I I use the PtMenuBar as parent of the PtWindow and the PtGroup as parent of the PtMenuBar the result is even more strange, the menu bar is smaller than intended and not used by the group.

So my question is: how does it work really? How can I build up such a menu structure when I do not want to use the AppBuilder? The QNX documentation seems to be really lousy here...
Active Member
Posts: 63
Joined: Sun Aug 02, 2009 4:57 pm

RE: Create menu structure for PtWindow

Postby juanplacco » Sat Apr 03, 2010 9:39 pm

Did you use a PtDivider as a parent of your menu buttons? Did you check the STRECH_HORIZONTAL flag of the divider?
Senior Member
Posts: 318
Joined: Wed May 17, 2006 2:30 pm

Return to General Programming

Who is online

Users browsing this forum: No registered users and 2 guests