Dennis Sacks | 23 May 23:32

xrc help

I created an xrc file using wxFormBuilder and have been looking at calculator.wx.lua for guidance but I'm still struggling. :)

I can load my frame and it displays, which made me very happy, but I am trying to access the menubar that is specified in my xrc file, and I'm not sure how to.

I've tried frame:FindWindow(xmlResource.GetXRCID("mbMain")) as well as just frame:FindWindow("mbMain") but I am getting nil from both. mbMain is the name of the menubar - I've verified that.

How do I manipulate the menubar?

Dennis

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
wxlua-users mailing list
wxlua-users@...
https://lists.sourceforge.net/lists/listinfo/wxlua-users
John Labenski | 4 Jun 06:06

Re: xrc help

On Fri, May 23, 2008 at 5:33 PM, Dennis Sacks <dennis.sacks@...> wrote:
> I created an xrc file using wxFormBuilder and have been looking at
> calculator.wx.lua for guidance but I'm still struggling. :)
>
> I can load my frame and it displays, which made me very happy, but I am
> trying to access the menubar that is specified in my xrc file, and I'm not
> sure how to.
>
> I've tried frame:FindWindow(xmlResource.GetXRCID("mbMain")) as well as just
> frame:FindWindow("mbMain") but I am getting nil from both. mbMain is the
> name of the menubar - I've verified that.

The wxMenubar might not be searched by wxWindow::FindWindow() since
it's not really a window, but if you can get the frame then just call
frame:GetMenuBar().

Hope this helps,
    John

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

Gmane