comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Can multiple windows share the same menu bar?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Can multiple windows share the same menu bar? [message #31117] Thu, 13 June 2002 00:21
marc schellens[1] is currently offline  marc schellens[1]
Messages: 183
Registered: January 2000
Senior Member
> ...
> So what I'm asking is this: Is there a way to tell the newly opened
> window that it should use the already-created menu bar and any event
> handlers associated with that menu bar? I have tried passing the
> original menu bar's widget ID to the new TLB when it is first created,
> i.e.
>
> TLB = WIDGET_BASE(APP_MENU=TLB_menu, [...])
> ...
> [ add buttons to TLB_menu ]
> ...
> new_TLB = WIDGET_BASE(GROUP_LEADER=TLB, APP_MENU=TLB_menu, [...])
>
> but that doesn't work - I don't even get the IDL menu, but a nearly
> blank one with only the Help option and the Apple menu.
>
> I realize that I can achieve what I want by simply duplicating the
> code that creates the menu bar inside my new widget, but that seems a
> little heavy-handed (especially when it comes time to change one of
> the options in the menu bar, because it will have to be changed in
> five or six different places) and I just thought there might be a more
> elegant way.

Why don't you just put the code for creating the menu bar in
a separate procedure (with tlb_menu as the argument)?

HTH,
marc
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: printing under Mandrake Linux
Next Topic: PLS IGNORE (printing under Mandrake Linux)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:47:53 PDT 2025

Total time taken to generate the page: 0.00461 seconds