wxpython

wxPython: wx.PyControl layout problem when it is a child of a wx.Panel

This is a continuation from this question: wxPython: Can a wx.PyControl contain a wx.Sizer? The main topic here is using a wx.Sizer inside a wx.PyControl. I had problems Fit()ting my CustomWidget around its child widgets. That problem was solved by calling Layout() after Fit(). However, as far as I have experienced, the solution only w...

How to run GUI2Exe from command line?

I'm using GUI2Exe to CX_freeze my python app, which is working great... if I want to build it manually. My next step is to automate this build, so I can build in one step Is there a way to use the exported setup.py to build? or to call GUI2Exe with some command line parameters to build the project? Thanks! Update: So I ran the...

wxSplashScreen Blank

I have a wx application which I just added a splash screen to, the problem is that sometimes (about 10% of the time) the splash screen frame pops up but is blank. I wrote the following test, which replicates the problem (below). The wx.Yield() helped somewhat, as the fail rate was more like 50% without it. Does anyone know how to fix ...

What are the existing open-source Python WxWidgets designers?

What are the usable tools? I am aware of wxformbuilder and wxGlade, but none of them seems to be complete yet. ...

Set global hotkey with Python 2.6

I wanna setup a global hotkey in python 2.6 that listens to the keyboard shortcut ctrl + D or ctrl + alt + D on windows, please help me ...

Dynamically update wxPython staticText

Hi all, i was wondering how to update a StaticText dynamically in wxpython? I have a script that goes every five minutes and reads a status from a webpage, then prints using wxpython the status in a static input. How would i dynamically, every 5 minutes update the statictext to reflect the status? thanks alot -soule ...

I'm trying to make a wx.Frame with variable transparancy (based on the png mapped in the erase bk event)

Hello, I'm trying to make a special splash screen that is displayed while the application is loading, it outputs messages of the various components loading and features a progress bar. The first job I am tackling is mapping a .png image to the frame that will host the splash screen. import wx class edSplash(wx.Frame): def __...

How to install pangocairo with python bindings on 32bit OSX 10.6

I'm having difficulties building the pangocairo bindings on my OSX 10.6 machine and would like to know how to proceed. To sketch the background, I'm writing a wxwindows application in Python with wxpython that draws on a cairo canvas. I have been able to compile all dependencies for this with the extra difficulty that I need 32bit (inst...

mplot3d in wxPython frame

I'm writing an application in wxPython. The button "Plot" shows the wxFrame with 3D surface but I can't rotate the surface. Is it possible to rotate a 3D plot placed in a wxFrame? How can I do? Example: import matplotlib matplotlib.use('WXAgg') from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas from matplot...

Hide/Delete a StaticText in wxPython

Hey eveybody, I was wondering how to hide/delete a StaticText in wxPython? thanks, soule ...

Create Explorer.exe's File - Context Menu in WxPython application

I have a WxPython app that, among other things, has a integrated file-browser. I want to be able to create a system-default file context menu (e.g. what you get if you right-click on a file in windows explorer) when a user right clicks on one of the items within my application. Note: I already know how to create my own context menu (e....

wxPython wx.Close create runtime error

When I try to call self.Close(True) in the top level Frame's EVT_CLOSE event handler, it raises a RuntimeError: maximum recursion depth exceeded. Here's the code: from PicEvolve import PicEvolve import wx class PicEvolveFrame(wx.Frame): def __init__(self, parent, id=-1,title="",pos=wx.DefaultPosition, size=wx.DefaultSize,...

Creating ScrolledWindow in wxPython

I am trying to make a ScrolledWindow that can scroll over a grid of images, but the scrollbar isn't appearing. wxWidgets documentation says: The most automatic and newest way [to set the scrollbars in wxScrolledWindow] is to simply let sizers determine the scrolling area. This is now the default when you set an interior sizer into a ...

Vibrate window in wxPython.

How would I vibrate a window in wxPython. I'd like some way of specifying how long to do it for and distance and stuff like that. Is there a builtin function I'm not noticing or would I have to code it myself? (I'm thinking of moving the window sideways a few times but I'd rather have a builtin function that might be faster.) ...

sending colored text to a TextCtrl in wxpython

I'm trying to send colored text to a TextCtrl widget, but don't know how style = wx.TE_MULTILINE|wx.BORDER_SUNKEN|wx.TE_READONLY|wx.TE_RICH2 self.status_area = wx.TextCtrl(self.panel, -1, pos=(10, 270),style=style, size=(380,150)) basically that snippet defines a status box...

wxpython cursor off event??

is there a mouse off (or cursor off) event in wxpython as I need to bind such an event to a panel, making it can automatically store the values input by the user when he is done and click on the other panel. Or is there any other alternative way to make it look nicer without creating uncessary buttons then to bind events to these buttons...

Dynamic suggestions for text ctrl in wxPython?

Is there any way to mimic the dynamic suggestions behavior as per the search field on Google? As in, I type something in a text ctrl, and a list of suggestions pops up below for the user to chose from? If wxPython doesn't have such a feature, perhaps some other Python gui has it? EDIT: For use on a Mac. That excludes this example, altho...

Grid of clickable images in wxPython

So I need to be able to open several images in a grid layout and click on the images to perform various actions. Right now I am adding the images to a grid sizer. How do I capture mouse events from a sizer? Or should I display the images in another way to make it easy to respond to mouse events? ...

wxPython: how to determine source of an event

I have a Panel with several images on it, each of which is bound to the same event handler. How can I determine which image is being clicked from the event handler? I tried using Event.GetEventObject() but it returns the parent panel instead of the image that was clicked. Here's some sample code: import math import wx class MyFrame(wx...

wxPython: Window and Event Id's

I have a Panel on which I display a StaticBitmap initialised with an id of 2. When I bind a mouse event to the image and call GetId() on the event, it returns -202. Why? import wx class MyFrame(wx.Frame): def __init__(self, parent, id=-1): wx.Frame.__init__(self,parent,id) self.panel = wx.Panel(self,wx.ID_ANY) ...