wxpython

How do I expand a wx.sizer of a wx.panel when the panel is expanded inside another wx.sizer?

I have a wx.Panel that has a GridBagSizer associated with it. This panel is placed inside another Sizer (BoxSizer), whose add has the expand flag - meaning that the panel takes up the full width of the sizer, which is great. ...But the panel's internal sizer does not fill the panel now. I've tried setting the internal sizer's flag to w...

Prevent wxPython from showing 'Unhandled exception' dialog

I have complex GUI application written in Python and wxPython. I want it to be certified for Windows Vista, so it has to crash in a way that causes Windows Error Reporting dialog (The one that asks "Do you want to send report to Microsoft?") to appear. This is relevant to test case no 32 from "Certified for Windows Vista Test Cases" doc...

Set the size of wx.GridBagSizer dynamically.

I'm creating an app where I drag button widgets into a panel. I would like to have a visible grid in the panel where i drop the widgets so the widgets will be aligned to the grid. I guess it isn't hard making a grid where the squares are 15x15 pixels using a GridBagSizer(since the widgets will span between multiple cells), but how can t...

How to change cursor position of wxRichTextCtrl in event handler?

I have a RichTextCtrl in my application, that has a handler for EVT_KEY_DOWN. The code that is executed is the following : def move_caret(self): pdb.set_trace() self.rich.GetCaret().Move((0,0)) self.Refresh() def onClick(self,event): self.move_caret() event.Skip() rich is my RichTextCtrl. Here is what I would ...

How can I insert RTF into a wxpython RichTextCtrl?

Is there a way to directly insert RTF text in a RichTextCtrl, ex:without going through BeginTextColour? I would like to use pygments together with the RichTextCtrl. ...

wx's idle and UI update events in PyQt

wx (and wxPython) has two events I miss in PyQt: EVT_IDLE that's being sent to a frame. It can be used to update the various widgets according to the application's state EVT_UPDATE_UI that's being sent to a widget when it has to be repainted and updated, so I can compute its state in the handler Now, PyQt doesn't seem to have these,...

wxpython auinotebook close tab event.

What event is used when I close a tab in an auinotebook? I tested with EVT_AUINOTEBOOK_PAGE_CLOSE(D). It didn't work. I would also like to fire a right click on the tab itself event. Where can I find all the events that can be used with the aui manager/notebook? Might just be my poor searching skills, but I can't find any lists over th...

wxPython or pygame for a simple card game?

I have been playing around with writing some simple card games in Python for fun and I would like to add a graphical user interface (GUI) to the games. Which library would you recommend for writing the GUI for a simple card game? ...

Generate a custom CommandEvent in wxPython

My top-level window needs to know when the internal state of a custom control changes so it can update various other parts of the GUI. How do I generate a custom event in the control, so it can propagate and be handled by the top-level window? ...

WinXP button-style with wxPython

Hi, guys. I noticed that my programs written with wxPython have Win98 button style. But Boa Constructor (that is written using wxPython too) got pretty buttons. How to make buttons look like current Windows buttons style? ...

wxPython auinotebook.GetSelection() return index to the first page.

Why do 'GetSelection()' return the index to the first page and not the last created in 'init' and 'new_panel'? It do return correct index in the 'click' method. The output should be 0 0 1 1 2 2, but mine is 0 0 0 0 0 0. Running latest version of python and wxpython in ArchLinux. Ørjan Pettersen #!/usr/bin/python #12_aui_notebook1.py...

Why is wx.SingleChoiceDialog not subclassing properly

I'm trying to subclass the wxpython SingleChoiceDialog class. I have a TableChoiceDialog class that inherits from SingleChoiceDialog adding generic functionality, and I have 2 sub classes for that add more refined functionality. Basically I'm O.O.P'ing In my TableChoiceDialog class I have a line which calls the superclass's __init__, ...

wxPython: Making a scrollable DC

Hey, I am drawing inside a wx.Window using a PaintDC. I am drawing circles and stuff like that into that window. Problem is, sometimes the circles go outside the scope of the window. I want a scrollbar to automatically appear whenever the drawing gets too big. What do I do? ...

Missing Network shares in wx.FileDialog

Hi everyone! I'm using Xubuntu 8.10 with Nautilus as file manager (XFCE desktop isn't active, Nautilus handles it), and I have a wxPython 2.8.8.0 application with a FileBrowseButton that works as expected, except for the "Network" shortcut on the left side of the FileDialog, that is missing. I tried with other applications too: Firefox ...

Dynamically change the choices in a wx.ComboBox()

I didn't find a better way to change the different choices in a wx.ComboBox() than swap the old ComboBox with a new one. Is there a better way? Oerjan Pettersen #!/usr/bin/python #20_combobox.py import wx import wx.lib.inspection class MyFrame(wx.Frame): def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **...

A wxPython timeline widget

Hello! I am looking for a certain wxPython widget to use in my program. I hope that something like this exists and that you might know where to find. I will try to describe the functionality I'm looking for: Imagine something like the widget that Audacity uses to display an audio track. It's a horizontal timeline, with a ruler. It is p...

Changing the title of a Tab in wx.Notebook

I'm experimenting with wxPython, I have a tabbed interface (notebook) and each tab is basically a file list view (yes, I'm trying to make a file manager) The file list inherits from wx.ListCtrl, and the tabbed interface inherits from wx.Notebook I'm just starting .. and I had it so double clicking on a folder will cd into that folder,...

wxPython for Python 3

Does wxPython have a version for Python 3? If it does, where can I get it? ...

How can I get the width of a wx.ListCtrl and its column name?

I'm working in wx.Python and I want to get the columns of my wx.ListCtrl to auto-resize i.e. to be at minimum the width of the column name and otherwise as wide as the widest element or its column name. At first I thought the ListCtrlAutoWidthMixin might do this but it doesn't so it looks like I might have to do it myself (Please correc...

What's the best way to propagate information from my wx.Process back to my main thread?

I'm trying to subclass wx.Process such that I have a customized process launcher that fires events back to the main thread with data collected from the stdout stream. Is this a good way of doing things? class BuildProcess(wx.Process): def __init__(self, cmd, notify=None): wx.Process.__init__(self, notify) print "Const...