Given the following simple program:
import wx
class TestDraw(wx.Panel):
def __init__(self,parent=None,id=-1):
wx.Panel.__init__(self,parent,id,style=wx.TAB_TRAVERSAL)
self.SetBackgroundColour("#FFFFFF")
self.Bind(wx.EVT_PAINT,self.onPaint)
self.SetDoubleBuffered(True)
self.circleX=320
...
I'm looking to add double buffering to a drawing function like this.
dc = wx.PaintDC(self)
gc = wx.GraphicsContext.Create(dc)
#draw GraphicsPaths to the gc
I tried to first draw to a MemoryDC and then blit that back to the PaintDC:
dc = wx.MemoryDC()
dc.SelectObject(wx.NullBitmap)
gc = wx.GraphicsContext.Creat...
import wx
class MainFrame(wx.Frame):
def __init__(self,parent,title):
wx.Frame.__init__(self, parent, title=title, size=(640,480))
self.mainPanel=DoubleBufferTest(self,-1)
self.Show(True)
class DoubleBufferTest(wx.Panel):
def __init__(self,parent=None,id=-1):
wx.Panel.__init__(self,parent,id,st...
Hi,
I want to use editable choice editor with PyGridTableBase. When I edit
a cell it is crashing What is error in my code?
My python code:
import wx
import wx.grid as gridlib
class MyTableBase(gridlib.PyGridTableBase):
def __init__(self):
gridlib.PyGridTableBase.__init__(self)
self.data = {0:["value 1", "value 2"],
...
I am using wxPython's HyperTreeList and I want to set the column width exactly equal to length of the largest string in it.
To accomplish that, I'd like to to convert a python string size into pixels.
For Example: If we have a string like
str = "python"
len(str) = 6
How could I convert the above string length/size into pixels?
Is ...
For better description,
+-----------------------+
| Desktop (screen) |
| |
| |
| +----------+ |
| | wxPython | |
| | App. | |
| | | |
| | | |
| +----------+ |
+-----------------------+
Look at WxPython App., whi...
I've been searching for a media player that can display sub-second resolution in videos. Some pointed me to the Frame stepping functionality in MPC, but I'd like even more than that.
I know from previous experience with wxPython that the wx.media.MediaCtrl both displays and (as fast as i can click with the mouse anyway) stops the video ...
I'm trying to compile a very simple wxPython script into an executable by using PyInstaller on Windows Vista.
The Python script is nothing but a Hello World in wxPython. I'm trying to get that up and running as a Windows executable before I add any of the features that the program needs to have. But I'm already stuck.
I've jumped throu...
Hello,
I have three panes with the InfoPane center option.
I want to know how to set their size.
Using 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):
...
Is it possible ho put an AuiManager inside an AuiNotebook page?
Have tested with a small sample code, but I only get a 'Segmentation fault'.
Is this possible to begin with? The reason why I want this is to split a notebook page in two parts and get the caption field and the maximize field in the top of each part of the two parts. A sim...
My goal: the user clicks a button. From the button pops up a two-level menu. The user clicks on something, and this triggers a callback which does stuff.
Here is a minimal example:
import wx
class MyApp(wx.App):
def OnInit(self):
frame = TestFrame(None, -1, "Hello from wxPython")
frame.Show(True)
self.Set...
Hello,
I want to load an image, resize it to a given size and after draw it in a specific position in a panel.
All this using wxpython.
How can I do it?
Thanks in advance!
...
I'm trying to create a wx.Menu that will be shared between a popup (called on right-click), and a sub menu accessible from the frame menubar. The following code demonstrates the problem.
If you open the "MENU>submenu" from the menubar the item "asdf" is visible. If you right click on the frame content area, "asdf" will be visible fr...
Hi Guys, I'm actually in need of your help and advice here on my assignment that I am working on. First of all, I was task to do a program that runs langton's ant simulation. For that, I've managed to get the source code (from snippets.dzone.com/posts/show/5143) and edited it accordingly to my requirements. This was done and ran in pygam...
Hi, i was curious if there is some sort of way to change the look and feel of wxpython to something that is more standardized. I am writing a small application for windows and mac os x. And i noticed that Mac formats the layout and look of my application pretty terribly. I looked around online and could not find anything. Any ideas?
...
Well, I have read several user guides and watched dozens and dozens of video tutorials on how to program with Python, and feel pretty confident about writing simple applications for it. My main point in my question is, where would I be able to learn more advanced programming knowledge about Python?
...
I have FigureCanvasWxAgg instance with a figure displayed on a frame. If user clicks on the canvas another frame with a new FigureCanvasWxAgg containing the same figure will be shown. By now closing the new frame can result in destroying the C++ part of the figure so that it won't be available for the first frame.
How can I save the fi...
hi. I am rather new to wx/python so please excuse if this is stupid or ill described.
I am substituting a nested sizer with a new one as shown in the snippet below. after some tinkering everything seems to work out but the re-drawing of the parent-sizer.
the content of the old nested sizer remains and gets "painted" over with the new si...
Hi All,
Not able to create standalone python binary package
1) The binary package works only on the machine on which it is build
2) There is always an error with respect console.py dependent on cx_freeze and wx libraries (.so files).
3) Tried the rpath trick suggested at this link http://wiki.wxpython.org/CreatingStandaloneExecutable...
Hi All,
I am getting an Access is denied error while I am trying to run the .pyo file by double click or from the command prompt.
Lets say I have abc.py (keeping main method entry point) which imports files xyz.py and imports wx etc.
I generate the .pyo file. But once I try to run abc.pyo I get the access is denied error.
I am not ge...