I have an XRC file that contains a complete menubar. I load this
menubar into a frame with:
self.ResMenu = wxXmlResource(" menus.xrc",0)
self.MenuBar = self.ResMenu.Lo adMenuBar("Menu BarEditor")
self.SetMenuBar (self.MenuBar)
Then set up a menu event handler:
EVT_MENU(self, XRCID("MenuItem SnapToGrid"), self.OnSnapToGr id)
Finally, in OnSnapToGrid, I try to get a specific wxMenuItem by using
the wxMenuBar.FindI tem:
m = self.MenuBar.Fi ndItem(XRCID("M enuItemSnapToGr id"))
This falls flat on its face because:
AttributeError: wxMenuBarPtr instance has no attribute 'FindItem'
It seems that LoadMenuBar returns a wxMenuBarPtr rather than a
wxMenuBar. My question then is given a wxMenuBarPtr and the ID of the
menu-item (via XRCID), how do I get ahold of the wxMenuItem object?
Alternativly, is there a way to check/uncheck a wxMenuItem without
having a reference to the actual object (using the id or similar)?
Thanks in advance,
Mark Moss 0 1226 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: RJS |
last post by:
Hi all,
I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32-
py2.2).
Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222.
In the sample below, commenting out "import numarray" allows the exe to
run. Left in, I get "4.exe has generated errors" etc.
I'm going around and around and there isn't much on Google.
py2exe output is last.
|
by: Curzio Basso |
last post by:
Hi all,
I have a problem for which I wasn't able to find an answer anywhere
else, maybe someone can give me a hint...
I designed with XRCed a small GUI (the code is at the bottom of the
message) made up of a menu and a frame in which there are two panels,
placed by an horizontal sizer.
Now, what I would like to do is to be able to load an image and display
|
by: flupke |
last post by:
Hi,
i'm trying to convert my java console app to a python gui.
Now, the only problem i seem to have at the moment are the resizers
for the layout. It seems that for the purpose of what i'm trying to do,
specifying the coordinates is easier that fighting with the layout resizers.
1) I have a screen split in 2. Left side is a textcontrol where logging will
end up. All text will be appended to the textcontrol. Ideally this should
allow...
|
by: OKB (not okblacke) |
last post by:
I've started taking a look at wxPython, and, well, I've noticed
that the syntax needed to code with it is extremely ugly. I am
wondering if there exist any preprocessing tools or clever refactorings
that allow users to write more sane-looking code. In particular, it
seems to me that the structure of the code often does not reflect the
structure of the GUI being designed. For instance, the wxPython wiki
"Getting Started" guide includes...
|
by: marchew |
last post by:
hi,
i have a problem integrating wxPython and Twisted under Win32. my
application consumes 40-50% of CPU resources when wxFrame is visible and reactor
(twisted) is running. i looked at integration example which comes with twisted
package and figured that it also has that problem. here comes listing:
PYTHON_HOME\Lib\site-packages\TwistedDocs\examples\wxdemo.py
#----------------------------------------------------------------
| |
by: Scott |
last post by:
I have the code below. I have changed the background of the frame to
white, but I cannot get the wxSlider to not be the ugly gray color.
Can someone tell me how to change it to a transparent background (I
tried wxTRANSPARENT_WINDOW without success)?
import os
from wxPython.wx import *
ID_ABOUT=101
ID_EXIT=110
class MainWindow(wxFrame):
|
by: Alex Nordhus |
last post by:
I need some help. I cant seem to get rid of this error.
I can program a button that will exit the program and remove the icon in
the taskbar, but I have to tie it to OnTaskBarClose.
OnExit and OnCloseWindow do nothing and leave the icon in the taskbar, I
think I have tried every option, when you double click the icon it gives
you the error.
Traceback (most recent call last):
|
by: linuxfreak |
last post by:
Hi all,
I have a problem. I want to add items to a Menu iteratively and I'm
stuck. Heres a snippet of my code
fileMenuChoices=
......
......
......
|
by: rodmc |
last post by:
I am totally new to Python and WxPython and need to write an
application which can open up an external windows from a plug-in within
GAIM (using pyGAIM). I have managed to hack some code together from
what little I have covered so far, however GAIM refuses to open until I
have closed the extra window. I appreciate this is probably a simple
point but I would be grateful for any advice people can offer on how I
can make them both appear so...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| | |