wxpython

Getting Wing IDE to stop catching the exceptions that wxPython catches

I started using Wing IDE and it's great. I'm building a wxPython app, and I noticed that Wing IDE catches exceptions that are usually caught by wxPython and not really raised. This is usually useful, but I would like to disable this behavior occasionally. How do I do that? ...

Glossy buttons in wxPython?

This is how they look in vista. They are glossier than the normal buttons and when the mouse is not over them they are flat. They have a correspondent version on Windows XP. Is there a way to get them using wxPython? ...

How to make custom buttons in wx?

I'd like to make a custom button in wxPython. Where should I start, how should I do it? ...

Is it possible to limit TextCtrl to accept numbers only in wxPython?

I want to have a text control that only accepts numbers. (Just integer values like 45 or 366) What is the best way to do this? ...

Set Max Width for Frame with ScrolledWindow in wxPython

I created a Frame object and I want to limit the width it can expand to. The only window in the frame is a ScrolledWindow object and that contains all other children. I have a lot of objects arranged with a BoxSizer oriented vertically so the ScrolledWindow object gets pretty tall. There is often a scrollbar to the right so you can scrol...

Potential Memory Leak in my wxPython App

I am pretty sure I am suffering from memory leakage, but I havent 100% nailed down how its happening. The application Iv'e written downloads 2 images from a url and queues each set of images, called a transaction, into a queue to be popped off by the user interface and displayed. The images are pretty big, averaging about 2.5MB. So as...

How do I scroll a wxPython wx.html.HtmlWindow back down to where it was when the user clicked a link?

I am using a wxPython wx.html.HtmlWindow to display part of my interface. The user can scroll down a list of links in a window smaller than the list. When they click on a link, I need to repaint the web page, but I want to return the page position back to where they clicked it. I've tried MouseEvent.GetLogicalPosition() on the event, b...

wxPython activate GriddCellEditor with single click

Hi, I bound an Eventhandler to the wx.grid.EVT_GRID_SELECT_CELL event and want to activate the editor in the selected cell. I couldn't get it working using: EnableCellEditControl or ShowCellEditControl. How can I achieve this? ...

How to create hover effect on StaticBitmap in wxpython?

Hi, I want to create hover effect on StaticBitmap - If the cursor of mouse is over the the bitmap, shows one image, if not, shows second image. It's trivial program (works perfectly with a button). However, StaticBitmap doesn't emit EVT_WINDOW_ENTER, EVT_WINDOW_LEAVE events. I can work with EVT_MOTION. If images are switched when the c...

wxPython: how to disable all accelerators temporarily?

How can I temporarily disable all accelerators in a wxPython app? For example, I have a special TextCtrl that I want to use to record a single keypress, and I don't want that keypress to be treated like an accelerator. While that widget has focus I want to disable all accelerators. On the wxPython mailing list it was suggested I bind...

Hiding Vertical Scrollbar in wx.TextCtrl

I have a wx.TextCtrl that I am using to represent a display with a fixed number of character rows and columns. I would like to hide the vertical scrollbar that is displayed to the right of the text pane since it is entirely unnecessary in my application. Is there a way to achieve this? Also...I would like to hide the blinking cursor tha...

wxPython, nested panels and accelerators

Accelerators on wxPython do not seem to work with nested panels. In other words: ----------------------------------------------- | Main panel | | ----------------- ----------------- | | | Subpanel 1 | | Subpanel 2 | | | | accelerator | | accelerator | ...

wx.StaticBitmap or wx.DC: Which is better to use for constantly changing images?

I would like to have a python gui that loads different images from files. I've seen many exmples of loading an image with some code like: img = wx.Image("1.jpg", wx.BITMAP_TYPE_ANY, -1) sb = wx.StaticBitmap(rightPanel, -1, wx.BitmapFromImage(img)) sizer.Add(sb) It seems to be suited for an image that will be there for the entire life ...

wxpython drag&drop focus problem

Hi, I'd like to implement drag&drop in wxPython that works in similar way that in WordPad/Eclipse etc. I mean the following: when something is being dropped to WordPad, WordPad window is on top with focus and text is added. In Eclipse editor text is pasted, Eclipse window gains focus and is on top. When I implement drag&drop using wxPy...

multiline checkbox in wxpython

Dear all, I'm working with wxpython (2.8) with python 2.5. is it possible to force a wx.CheckBox to display its label on multiple lines? I'd like to be able to do the same as wx.StaticText.Wrap(width) See the attached example: the wx.CheckBox is 200 px wide, but it's label does not fit in this space. Any help is really appreciated! Th...

How to check which part of app is consuming CPU?

I have a wxPython app which has many worker threads, idle event cycles, and many other such event handling code which can consume CPU, for now when app is not being interacted with consumes about 8-10% CPU. Question: Is there a tool which can tell which part/threads of my app is consuming most CPU? If there are no such generic tools, I...

wxpython -- threads and window events

I have a wxPython application (http://www.OpenSTV.org) that counts ballots using methods that have multiple rounds. I'd like to do two things: (1) For a large number of ballots, this can be a bit slow, so I'd like to show the user a progress dialog so he doesn't think the application is frozen. (2) I'd like to allow the user to break ...

wx.TextCtrl.LoadFile()

I am trying to display search result data quickly. I have all absolute file paths for files on my network drive(s) in a single, ~50MB text file. The python script makes a single pass over every line in this file [kept on the local drive] in a second or less, and that is acceptable. That is the time it takes to gather results. However, ...

Displaying integers in a wxpython listctrl

I have a wxPython ListCtrl with five columns. Four of these hold strings, the last one has integer values. I have been storing these as strings (i.e. '4', '17', etc.). However, now that I have added a ColumnSorterMixin to let me sort specific columns in the list, I'm finding, of course, that the integer column is being sorted lexically r...

Close Python when Parent is closed

I have a Python program (PP) that loads another Program(AP) via COM, gets its window handle and sets it to be the PP parent. This works pretty well except that I can't control that AP still has their [X] button available in the top left corner. Since this is a pretty obvious place for the user to close when they are done with the progr...