wxpython

wxPython: Context help

In Windows dialog boxes, sometimes there is a small ? button on the upper right corner. Its usage is to click on the ?, then the cursor changes to an arrow with a ?, then click on widget inside the dialog box, which will then display a popup help balloon. This is how my class definition looks like: class Frame(wx.Frame): def __init__...

wxPython validator not called for grandchild of dialogue

I have something like this: class ADialog(wx.Dialog): def __init__(self, parent, *args, **kwargs): ... self.editor = APanel(parent=self) ... ... class APanel(wx.Panel): def CreatePanel(self, *args, **kwargs): ... self.textCtrls = [] for (key, val) in zip(foo, bar): ...

wx.ProgressDialog disappears

The progress dialog disappers rather then the cancel button changing to a close button when it is to be destroyed (and the PD_AUTO_HIDE flag is not set). progressDlg = wx.ProgressDialog("Organizing music files", "This may take some time..", maximum=9999...

how can i fastest draw bitmap with wx

I use the wx.DC and wx.GC to draw video(640*480) on penel , but it need about 10% cpu usage, i think the cost is big, my expectation usage is below 5% . How can i do it? Thanks! ...

Changing the size of a wx.ProgressDialog

The size of the ProgresDialog is too narrow to hold the text that I need to display... I tryed to change the size of the dialog by calling the SetSize method on the dialog after it is created. This fixed the size of the dialog but on creation of the dialog the gauge size is initially smaller and then jumps in size to fit the dialog box...

How to unit test wxPython?

I've heard of unit testing, and written some tests myself just as tests but never used any testing frameworks. Now I'm writing a wxPython GUI for some in-house data analysis/visualisation libraries. I've read some of the obvious Google results, like http://wiki.wxpython.org/Unit%20Testing%20with%20wxPython and its link http://pywinauto.o...

wxPython: Right-align the numbers in a wx.SpinCtrl

A primary reason to use wx.SpinCtrl is to restrict the user to input integers, therefore I think that the text inside it would look better if right-aligned. Is there a way to do this in wxPython? ...

Access native windows icons for custom wxDialogs

I want to subclass wx.Dialog to get a little more functionality than is provided by the wx.MessageDialog class but I would still like to be able to use the native windows icons (ie the ones used in the wx.MessageDialog that can be set by the flags such as wx.ICON_ERROR etc.. ) Is there anyway to access these? Update: Thanks to steven ...

wxPython: "Super" wx.SpinCtrl with float values, layout inside sizer

wx.SpinCtrl is limited to spinning across integers, and not floats. Therefore, I am building a wx.TextCtrl + wx.SpinButton combo class which enables me to spin across floats. I am able to size and layout both of them programmatically so that the combo looks exactly the same as an ordinary wx.SpinCtrl. I am subclassing this combo from th...

Pausing a thread using threading class

I have a long process that i've scheduled to run in a thread, because otherwise it will freeze the ui in my wxpython application. I'm using threading.Thread(target = myLongProcess).start() to start the thread and it works, but I don't know how to pause and resume the thread. I looked in the python docs for the above methods, but was...

ObjectListView Flickers/Flashes when adding a new list object

When I update my objectListView list it flickers/flashes white, is this normal behaviour or can it be prevented. The list gets updated around every 1-5 seconds using the AddObject method if that makes any difference. ...

Is there a wxpython list widget that displays alternating row colours even when the list is empty?

Is there a wxpython list widget that displays alternating row colours even when empty the list is empty? or Is there even one that will display a background colour(other than white) when it is empty? ...

Re-factoring To MVC pattern -Doubts on separation of view from controller

At the momement Im trying to refactor my application (with 1000+ lines of GUI code) to an MVC style pattern. The logic code is already seperate from the GUI so that is not a problem. My concern is seperation of the view from the controller. I understand the basic principal of MVC and this tutorial in the wxpython wiki has been very help...

wxPython: Can a wx.PyControl contain a wx.Sizer?

Can a wx.PyControl contain a wx.Sizer? Note that what I am ultimately trying to do here (spinner with float values) is already answered in another question. I am particularly interested in layouting widgets within a wx.PyControl, a skill which might prove useful if I come across a need to make my own custom widgets. I already read throu...

Tool to easily create a wxPython preference dialog from a template ?

I need a wxPython preference dialog box from a Python application. I could hand-code it (and use wxGlade to do part of the job), but I was wondering if there is no tool that makes creation of simple preference dialog boxes easier. The 'easier' part would be in that you can specify that you need e.g. a text box, and both the GUI elements...

Why is this code not accepting this png images transparency?

I've isolated the cause of the problem to be the image, since the code seems to work with other png images with transparency. However, it doesn't seem to work with the one image I need it to. This would be of great help seeing as I'm trying to make a nice shaped window. The image: The code: import wx class PictureWindow(wx.Frame):...

Help with a custom GUI in wxpython

I'm new to wxPython, so bear with me. I'm creating a custom GUI set up and need to get two attributes. Firstly I want to create an inner boarder of a different color (The single dark boarder looks too plain). Secondly, I need to bind the dragging attribute so that only the label will allow dragging as opposed to the whole frame. Also ...

wxPython Geometry problem

I'm trying to get the button to be right of the label. I set the tuple and am still not sure why it covers the label. Also is there a good tutorial available on wxpython geometry? import wx import wx.lib.agw.gradientbutton as GB def GetRoundBitmap( w, h, r ): maskColor = wx.Color(0,0,0) shownColor = wx.Color(5,5,5) b = w...

wxPython threaded UDP server

Hi, I am trying to put together a UDP server with a wxPython GUI. Here is a link to the code: UDP Server pastie.org I have linked it as its pretty lengthy. I have successfully got the UDP server running on the thread but I can not figure out how to close the socket when the stopping the thread. At the moment it will kick up a new t...

How to insert dynamic string in wxpython html window? (wx.html.htmlwindow)

I am making a html window in wxpython and want to print it. Before that I need to enter user input (such as his name or such things ) in the html page. How to do that nicely? Thanks in advance, ...