wxpython

wxPython - wx.MDIChildFrame

I'm sure this is simple, but I can't seem to find the answer. While using wx.MDIParentFrame, I open a new window with wx.MDIChildFrame. There is static text on the ParentFrame, and once the ChildFrame opens the text gets erased from the ParentFrame? import wx class Frame(wx.MDIParentFrame): def __init__(self): wx.MDIParentF...

No acceleration for OpenGL and ImportError for modules that exist

I'm writing a program using wxPython and OpenGL. The program works, but without any antialiasing, and I get these error messages: (I'm using ArchLinux) INFO:OpenGL.acceleratesupport:No OpenGL_accelerate module loaded: No module named OpenGL_accelerate However, when I look into my site-packages folder, I see the module present there. I...

wxPython - ListCrtl and SQLite3

I'm trying to get a SQLite3 DB to populate a wx.ListCrtl. I can get it to print to stdout/stderr without any problem. I just can't seem to figure out how to display the data in the DataWindow/DataList? I'm sure I've made some code mistakes, so any help is appreciated. Main.py import wx import wx.lib.mixins.listctrl as listmix from da...

If Possible, How Can One Set Either a Background Color on Cells within a Sizer or Gridlines for the Sizer?

I am flailing about with wxWidgets, in particular, the wx.Sizer in wxPython. I have read the documents, I have a copy of wXPython in Action before me, and have set aside the problem to work on other things a better mental model of sizers hopefully gestated within my skull. None of this has worked. I am not grokking, or even getting ...

wxPython, Threads, and PostEvent between modules

I'm relatively new to wxPython (but not Python itself), so forgive me if I've missed something here. I'm writing a GUI application, which at a very basic level consists of "Start" and "Stop" buttons that start and stop a thread. This thread is an infinite loop, which only ends when the thread is stopped. The loop generates messages, whi...

wxPython: Sending a signal to several widgets

I am not even sure how to ask this question. I want something that is like the wxPython event system, but a bit different. I'll try to explain. When there is a certain change in my program (a "tree change", never mind what that is,) I want to send a signal to all the widgets in my program, notifying them that a "tree change" has occurre...

Appropriate wx.Sizer(s) for the job?

I have a space in which I would like certain elements (represented here by A, B, D, and G) to each be in its own "corner" of the design. The corners ought to line up as if each of the four elements was repelling the other; a rectangle. This is to be contained within an unresizable panel. I will have several similar panels and want to k...

Hierarchical checked tree control with tri-state checkboxes in wxPython?

As per the title, is this possible? By tri-state, I mean the parent node is: Checked if all children are checked Unchecked if all children are unchecked Grey/Filled if some children are checked I have used them previously in C# but cannot find an equivalent control/implementation for wxPython. ...

Should I mix wxpython and pyobjc ?

I have a wxPython based app which I am porting to Mac OS X, in that I need to show some alerts which should look like native mac alerts, so I am using pyobjc for that e.g. import Cocoa import wx app = wx.PySimpleApp() frame = wx.Frame(None, title="mac alert test") app.SetTopWindow(frame) frame.Show() def onclick(event): Cocoa.CFU...

Configuring Eclipse with wxPython

Hi, I've been browsing documentation, but haven't been able to find a straightforward tutorial, so I apologize if this is a really simple question. Anyway, I have eclipse with pydev installed on MAC OSX, and I want configure wxPython to work with eclipse, how do I do this? Once I've downloaded wxpython, what steps do I take to allow wx...

Why Does .Hide()ing and .Show()ing Panels in wxPython Result in the Sizer Changing the Layout?

As referenced in my previous question, I am trying to make something slightly wizard-like in function. I have settled on a single frame with a sizer added to it. I build panels for each of the screens I would like users to see, add them to the frame's sizer, then switch between panels by .Hide()ing one panel, then calling a custom .Sho...

WxPython Incompatible With Snow Leopard?

Hello all, Recently I upgraded to Snow Leopard, and now I can't run programs built with wxPython. The errors I get are (from Eclipse + PyDev): import wx File "/var/tmp/wxWidgets/wxWidgets-13~231/2.6/DSTROOT/System/Library/Frameworks /Python.framework/Versions/2.6/Extras/lib/ python/wx-2.8-mac-unicode/wx/__init__.py", line 45, ...

How use the google maps hand cursor in Python?

Hello, I want to use the google maps hand cursor in Python but I don't know how to do it. I've downloaded the cursor but I only get to use the hand open, I also have a event that "closes" the hand when clicked but I don't know how can I change the style cursor on it. I say this because the google maps hand cursor has two style (the ope...

wxPython: Load font from file

I'm making a wxPython app, and I want to use some non-standard font that I have on file. How do I do this? ...

wxWidgets/wxPython: Do two identical events cause two handlings?

When there are two identical events in the event loop, will wxPython handle both of them, or will it call the handler only once for them both? I mean, in my widget I want to have an event like EVT_NEED_TO_RECALCULATE_X. I want this event to be posted in all kinds of different circumstances that require x to be recalculated. However, eve...

How to draw text in a bitmap using wxpython?

Hello, I want to draw a number centered inside a wx.EmptyBitmap. How can I do it using wxpython? Thanks in advance :) import wx app = None class Size(wx.Frame): def __init__(self, parent, id, title): frame = wx.Frame.__init__(self, parent, id, title, size=(250, 200)) bmp = wx.EmptyBitmap(100, 100) dc = w...

Does wx.DC line has events?

A line created using the DrawLine method of wx.DC has the onClick and onMouseOver events? ...

Tri-state checkboxes in wxPython's CustomTreeCtrl?

I have a CustomTreeCtrl with some items with children themselves. Unfortunately there is no indication when only some children of an item are selected - the parent checkbox is either checked (all children selected) or unchecked (no children selected). Is there any way of using a tri-state checkbox, rather than the current checked/unche...

Is it possible to resize the movie display area in wx.MediaCtrl (Python 2.6)?

Hi All, I am quite new to Python GUI programming. As a part of an assignmnet I have implemented a simple frame with a media player (wx.MediaCtrl) embeded in it. Now I would like to know if it is possible to resize the display area of MediaCtrl (with out resizing the frame) by pulling it with the mouse or just by hitting a button? Pleas...

How to rotate the text of a wx.StaticText?

Hello, I want to write a Static Text with an upside down ^ How can I do it? Thanks in advance :) ...