AW: AW: Menu Events
"Alexander Gnauck" <[email protected]> Fri, 13 Aug 2004 18:30:00 +0200
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Message-ID | <[email protected]> |
Hi, Ok, i didnt look very carefully at the auto created code. Better to go back writing the code by hand. Or is there a solution with towxNET that works better than the combination with wxGlade? Alex > -----Ursprüngliche Nachricht----- > Von: [email protected] > [mailto:[email protected]] Im Auftrag > von Alexander Olk > Gesendet: Freitag, 13. August 2004 18:21 > An: [email protected] > Betreff: Re: AW: [Wxnet-users] Menu Events > > Am Do, den 12.08.2004 schrieb Alexander Gnauck um 22:10: > > I attached the code. I created this small form using > wxGlade 0.33 and > > towxnet.exe from the 0.5 binary build. > > First of, MenuItem mnuFileExit wasn't initialized at all... > That is why the programm crashed. > Use mnuFileExit = mnuFileExit.Append(...) (TowxNET doesn't > use the new event system yet...) > > Second, put your code that adds menus to the MenuBar after > all the other Menu initialization code: > > --- snip --- > mnuHelp.Append( (int)Cmd.ID_MenuItem_mnuHelpAbout, "About", > "", ItemKind.wxITEM_NORMAL ); > > menubar.Append( mnuFile, "File" ); > menubar.Append( mnuHelp, "Help" ); > MenuBar = menubar; > > //Properties > int[] statusbar_widths = { -1 }; > --- snip --- > > Another way to add an EventListener to a MenuItem is: > myMenu.Append(myMenuItem, new EventListener(DoSomething)); or > myMenu.AppendWL(anid, "E&xit", new EventListener(DoSomething)); > > -- > Alexander Olk > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > wxnet-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wxnet-users > ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285