wxpython

wxPython How to control a frame from another frame?

Hello. I'm writing a small app which has 2 separate frames. The first frame is like a video player controller. It has Play/Stop/Pause buttons etc. It's named controller.py. The second frame contains OpenGL rendering and many things inside it, but everything is wrapped inside a Frame() class as the above. It's named model.py. I'm up to...

How o Delete ALL Pages of agw.aui.notebook in One shot ?

Hi, I have a auiNotebook built from agw library. Now i have added few pages Now i have to delete ALL pages at one shot. Please let me know how to do this. Or is there any method which gives me List of Page Indexs for All Added Pages so that i can use Delete Page method to delete all pages Enviroment: Windows,wxpython ...

wxWidgets custom window shape (PNG)

Hi! I'm using wxPython bindings for wxWidgets. Is it possible to create custom-shaped window from PNG image and in count alpha-channel? Take a look at VS2010 splash screen to see what I mean: Highlighted zones (rounded corner and shadow) are not sharp, they use alpha-channel to look smooth. Update: I want not only custom shape, but ...

Destop application in Python with more than one frame!

I have developed many desktop applications in Delphi / Pascal - Here I have used modal forms. //Mainform Form1:= TForm1.Create(Self); If Form1.Showmodal =mrOK then …. In Form1 you cal call vars in Mainform like mainform.X := 1 (I know – I normaly use try,except, finally) I will now switch to Python and my problem is the follo...

Python - Creating a "scripting" system

Hello, I'm making a wxpython app that I will compile with the various freezing utility out there to create an executable for multiple platforms. the program will be a map editer for a tile-based game engine in this app I want to provide a scripting system so that advanced users can modify the behavior of the program such as modifying p...

how to delete or destroy the wx.panel from its parent (another wx.panel object) ?

HI, guys I am developing a GUI with wxPython. I draw a square which represents a CD object, inside another square (also with wxPanel class), which represents CD Container Object. I want to have "delete this CD" in the right click menu of CDWindow, which will remove the CDwindow. enter code here` Basically, my code looks like this (for ...

Fix for all-black wx cursors on windows

The following code demonstrates a problem with certain wx cursors on Windows (OSX cursors have a white outline)... namely, they are all black, and therefore completely invisible on a black background. import wx app = wx.PySimpleApp() f = wx.Frame(None) f.SetBackgroundColour(wx.Color(0)) f.SetCursor(wx.StockCursor(wx.CURSOR_CROSS)) f.Sho...

Class inheritance for GUI using wxpython

I have a very simple GUI that accepts two parameters and then calls three other classes whose names are DigitalFilter(), BeatByBeatVariables(), and GetSummaryOfWholeTest(). This is my first time writing up classes, and I need help with the syntax. Specifically, can you help me with inheritance? I want the GUI's class MainWindow(wx.Fra...

Python cross platform

If I create a gui for windows using python 2.6 and Qt, and then want to running in solaris or linux world. What do I need on both systems, I'm guessing 2.6 and Qt for both platforms. Is this correct or would there be a better solution. If wxpython, the same right? ...

Redirect RuntimeError to log instead of console in wxPython?

How do I redirect RuntimeError to log instead of the console? In the code below, the 'Hello' is printed to console, which is redirected to the wx.TextCtrl. The RuntimeError raised OnClose is printed to the terminal however. How do I redirect the RuntimeError to see same log as the 'Hello'? import sys import wx class RedirectText: ...

Slim down Python wxPython OS X app built with py2app?

I have just made a small little app of a Python wxPython script with py2app. Everything worked as advertised, but the app is pretty big in size. Is there any way to optimize py2app to make the app smaller in size? ...

How to Append data to a combobox

I need to insert data to a combobox so i do an append as defined in this lines : fd = open(files,'rb') data=fd.readlines() for i in data[]: item=i.strip() if item is not None: combobox.Append(item) fd.close Even data insert the selection still void please can you tell me how to set a selection a value from the items read...

Fade in/out the background color of wxpython grid cell

I've got a wxpython grid, and I'm changing the background color of a cell to show that something has happened to it. I'd like to fade the color change in/out (like JavaScript in the browser) for a smoother look. Is this possible to do? Right now, I'm just changing the background color, and then changing it back after a 1.5-second inter...

Insert data into texctrl

To insert data into a textctrl i do this : num_items = self.lc_sources.GetItemCount() self.lc_sources.SetStringItem(num_items, 1, data) But the problem is the insertion is done after the treatment of data, well and i need to do insertion in real time. Please how can i do this ...

How to change Selection Colour for selected items in wxpython's CustomTreeCtrl

I am using wxpython's CustumTreeCtrl. Since some of the items in my tree-hierarchy are supposed to have different textcolours it would useful if these items also keep their textcolours when selected. However, when an item is selected the background colour is automatically changed to blue (that can be controlled with SetHilightFocusColour...

Pygtk VS Pyqt VS WxPython VS Tkinter

What is the most used of these library and why ? What are the differences ? ...

How can I get a wxFrame to refresh without having to manually resize it in wxPython?

I have a simple frame in a wxPython script that isn't refreshing like I'd like it to. Basically the frame starts out blank. The user can then select different datasets to view in a grid form. When the dataset has been chosen, the script creates a grid and puts it in a sizer in the frame. The problem is that the frame shows the grid in a...

Why my code doesn't work?

Why doesn't this work? for i in [a, b, c]: i.SetBitmap(wx.Bitmap(VarFiles[str(i)])) I get: Traceback (most recent call last): File "<string>", line 11, in ? File "codecc.py", line 724, in ? app = MyApp(0) # stdio to console; nothing = stdio to its own window File "C:\Program Files (x86)\WorldViz\Vizard30\bin\lib\site-...

wxPython CheckListBox with HTML

I'm using wxPython to create a GUI app. Right now I'm using a wx.CheckListBox to display options with check boxes, but I'd like the text in the CheckListBox to be formatted using HTML. What's the best way to go about this? ...

wx.ProgressDialog using a counter instead of a timer

I need to include a progress bar in my wxpython application, but the examples I found use a timer counting down from a fixed time length. Since I have no idea how long it will take a given computer to run my process, I want the progress bar to simply update whenever each specific step is completed. I modified some sample code to accomp...