Hello,
with this code:
import wx
class Plugin(wx.Panel):
def __init__(self, parent, *args, **kwargs):
panel = wx.Panel.__init__(self, parent, *args, **kwargs)
self.colorOver = ((89,89,89))
self.colorLeave = ((110,110,110))
self.colorFont = ((145,145,145))
self.SetBackgroundColour(self.colo...
I'm coding an application that needs to select an area of the screen. I need to change the cursor to a cross and then draw a rectangle on the user selection. The first thing I searched for is how to manipulate the cursor and I came across wxPython. With wxPython I could easily do this on a Frame with a Panel, the thing is that I'd need t...
Hello,
I have this code:
class SoundLog(wx.Frame):
def __init__(self, *args, **kwargs):
wx.Frame.__init__(self, size=(500, 350), *args, **kwargs)
self.SetBackgroundColour((110,110,110))
self.sizer = wx.BoxSizer(wx.VERTICAL)
pluginsNumber = len(plugins) - len(pluginsToHide)
self.gs = wx.Grid...
I have to draw a graph of elements composing a topological model of a physical network. There would be nodes and arches, and the latter could be unidirectional or bidirectional.
I would like to capture the clicking events for the nodes and the arches (to select the element and show its properties somewhere), and the dragging events for ...
Do you know if there is an easy way to drag-and-drop elements (icons or buttons) into a canvas and create different drawings on it as a result?
The idea is to have a set of objects and let the user drag them into a drawing space.
In the worst case the user could just click on the icon/button, and then click on the canvas and draw the e...
Hi All,
I am creating a tar file ( from several files), now while saving this tar file i save this file as my particular extension like (.xyz), so i want whenever i save this type file (.xyz extension) from my tool this file should save with a particular ico file format. This is similar like when we save a bmp or jpeg file from mspaint ...
In a wxPython application, which i am porting to Mac OSX, I set title of app frame every 500msec in update UI event, and due to that all the panels and windows are refreshed. That seems strange to me and almost halts my application which has many custom drawn controls and screens.
I wanted to know what could be the reason behind it, is ...
I'm trying to make a new wx.Choice-like control (actually a replacement for wx.Choice) which uses the wx.ItemContainer to manage the list of items. Here is a minimal example showing the error:
import wx
class c(wx.ItemContainer):
def __init__(my): pass
x = c()
x.Clear()
This fails with:
Traceback (most recent call last):
File...
Is there an Application.DoEvents() equivalent in wxPython?
I am creating a form, then doing a slow I/O event, and the form is only partially drawn until the event finishes. I'd like to have the form fully drawn before the I/O starts.
I've tried self.Refresh(), but it has no effect.
...
I am trying to learn how to run a thread off the main GUI app to do my serial port sending/receiving while keeping my GUI alive. My best Googling attempts have landed me at the wxpython wiki on: http://wiki.wxpython.org/LongRunningTasks which provides several examples. I have settled on learning the first example, involving starting a wo...
It appears to me that the DC's only support for curves of any sort is with splines. Are there any libraries that add bezier functionality, or is there a way to convert a bezier curve into a spline?
...
The simple curve in this application only appears when it's dragged off the screen, or the window is resized. When the application just starts up it doesn't appear, and when the window is maximized or minimized it also disappears. However, all of these times, "Path Drawn" is printed, so all of the painting functions are called. Is there ...
I apologize for a simple question, but I did not see this in the tutorials.
I have a very simple gui, but I would like the user to be able to press the TAB key and have it move from one input field to another. I am using wxPython with Python 2.6.
...
Hello,
how can I click on a wx.Panel and that changes its color?
What is the name of the event.
(I want to do a similar thing as Firefox Extras)
Thanks in advance! :)
...
I am new to wxPython. Can someone help me in:
How to add multiple TreeListCtrl on Frame/Panel like following:
First TreeListCtrl
show the tree and its child
Second TreeListCtrl
show the tree and its child
Third TreeListCtrl
show the tree and its child
Second, what is the best way to implement a TreeListCtrl in wxPython lik...
Hello,
I want to color the background (SetBackgroundColour) of a wx.Panel with a blue to black degradê.
How can I make it?
...
Hello,
with this code:
import wx
import wx.aui
class MyFrame(wx.Frame):
def __init__(self, parent, id=-1, title='wx.aui Test',
pos=wx.DefaultPosition, size=(800, 600),
style=wx.DEFAULT_FRAME_STYLE):
wx.Frame.__init__(self, parent, id, title, pos, size, style)
self._mgr = wx.aui.A...
I created a TreeListCtrl in wxPython like following.
self.tree = wx.gizmos.TreeListCtrl(self, style =
wx.TR_DEFAULT_STYLE
| wx.TR_FULL_ROW_HIGHLIGHT | wx.TR_HIDE_ROOT | wx.TR_HAS_VARIABLE_ROW_HEIGHT)
As you see i set wx.TR_HAS_VARIABLE_ROW_HEIGHT but...
I want to add a new feature in a wxPython class. I also want the existing functionality as it is plus new functionality. What is the best way to achieve the target? It would be great if someone can tell a step by step procedure?
I am newbie to wxPython, and writing my first application in wxPython.
Also, what is the difference between ...
My program uses wx.ProgressDialog to give feedback on a process that is in multiple stages. At the beginning of each stage, I use the second argument of Update to change the message in the dialog.
The problem is that the width of the dialog is determined from the message in the constructor, and the dialog is not resized if a later call...