ich@jensdiemer.de wrote:
This is because you can only load top-level items from the XRC, and since frame_1_menubar is embedded within the frame it is not seen by the LoadMenu function. It will, however, be loaded automatically by the frame when it is loaded from the XRC.
Thats ok, but i can't see the MenuBar! So i can make this:
EVT_MENU(self.Frame, XRCID("item_Name"), self.test)
But when i didn't see the Menu-Button -> i can't use it
I have still the following error:
No handler found for XML node 'object', class 'wxMenuItem'!
and i don't know, what i have to do...
Did you add the wxMenu object as I showed in the XRC below?
···
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- generated by wxGlade 0.3.5.1 on Sat Dec 04 00:01:17 2004 --><resource version="2.3.0.1">
<object class="wxFrame" name="frame_1" subclass="MyFrame">
<style>wxDEFAULT_FRAME_STYLE</style>
<title>frame_1</title>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxPanel" name="panel_1">
<style>wxTAB_TRAVERSAL</style>
</object>
</object>
</object>
<object class="wxMenuBar" name="frame_1_menubar"><object class="wxMenu" name="themenu">
<label>TheMenu</label><object class="wxMenuItem" name="item_Name">
<label>item</label>
</object></object>
</object>
</object>
</resource>
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!