wxpython

Network-aware wx.FileDialog

Hi all, I'm using wx.FileDialog in a wxPython 2.8.8.0 application, under Xubuntu 8.10.. My problem is that this dialog isn't network-aware, so I can't browse Samba shares. I see that this problem plagues other applications too (Firefox, Audacious...) so I'd like to ask where I could find informations on how to make it work. Is that dialo...

wxPython: Drawing inside a ScrolledPanel

I'm using a PaintDC to draw inside a ScrolledPanel. However, when I run the program, the scroll bars have no effect. They're the right size, but the picture doesn't move when you scroll with them. I figured I may have to convert from logical to device coordinates. I tried x=dc.LogicalToDeviceX(x) and y=dc.LogicalToDeviceY(y), but there ...

wxPython: What is the difference between a wx.Panel and a wx.Window?

I got the impression that Panel is better. Is that true? What advantage does one have over the other? What reason is there to use one over the other? ...

Adding system menu items in wxPython/wxWidgets

How is it possible to add menu items to the system menu of a frame in wxPython/wxWidgets? (I'm talking about the menu that appears when clicking on the application icon in Windows - the one with Minimize, Maximize, Close, ...). I want to add a menu item of my own for a simple application that doesn't require a full blown top menu. A Wi...

wxPython: Drawing a vector-based image from file

How can I draw a vector-based image from a file in wxPython? I know nothing of image formats for such a thing, so please recommend. ...

Problem when using MemoryDC

Why does my code print the lines gray instead of black? import wx class MyFrame(wx.Frame): def __init__(self,*args,**kwargs): wx.Frame.__init__(self,*args,**kwargs) self.panel=wx.Panel(self,-1,size=(1000,1000)) self.Bind(wx.EVT_PAINT, self.on_paint) self.Bind(wx.EVT_SIZE, self.on_size) self....

Need advice (GUI, widgets) - implement area selection on a plot

(I am new to GUI programming; experienced programmer otherwise) (Using wxPython; but generic advice welcome) I am looking for advice / direction on implementing a widget that can do area selection on a plot. Any pointers from experienced users would be much appreciated. What needs to be done is: Implement a two dimensional plot. Imp...

How can I draw a bitmap rotated in wxPython?

How do I draw a bitmap to a DC, while rotating it by a specified angle? ...

Infinite recursion trying to check all elements of a TreeCtrl

I have a TreeCtrl in which more than one Item can be assigned the same object as PyData. When the object is updated, I want to update all of the items in the tree which have that object as their PyData. I thought the following code would solve the problem quite neatly, but for some reason the logical test (current != self.GetFirstVisibl...

Python: Plugging wx.py.shell.Shell into a separate process

I would like to create a shell which will control a separate process that I created with the multiprocessing module. Possible? How? EDIT: I have already achieved a way to send commands to the secondary process: I created a code.InteractiveConsole in that process, and attached it to an input queue and an output queue, so I can command t...

wxPython: Path problems when exporting a bitmap.

I have a module which starts a wxPython app, which loads a wx.Bitmap from file for use as a toolbar button. It looks like this: wx.Bitmap("images\\new.png", wx.BITMAP_TYPE_ANY). All works well when I run that module by itself, but when I try to import and run it from a different module which is in a different directory, wxPython raises a...

wxPython launches my app twice when importing a sub-package

I'm sorry for the verbal description. I have a wxPython app in a file called applicationwindow.py that resides in a package called garlicsimwx. When I launch the app by launching the aforementioned file, it all works well. However, I have created a file rundemo.py in a folder which contains the garlicsimwx package, which runs the app as...

wxPython: execute command asynchronously, display stdout in text widget

I'm looking for the wxPython equivalent to my answer for Tcl/Tk examples?. Specifically, I want to see an example of how to create several buttons, each of which runs some external command when clicked. While the process is running I want the output to go to a scrollable wxPython widget. While the process is running the GUI should not ...

wxPython + multiprocessing: Checking if a color string is legitimate

I have a wxPython program with two processes: A primary and a secondary one (I'm using the multiprocessing module.) The primary one runs the wxPython GUI, the secondary one does not. However, there is something I would like to do from the secondary process: Given a string that describes a color, to check whether this would be legitimate ...

wxPython dialogs: "Enter" keyboard button would not "ok" the dialog

I am creating a custom wxPython dialog by subclassing wx.Dialog. When I press Enter while using it, (and while being focused on one of the form elements,) it just takes the focus to the next form element, while I want it to press the ok button. How do I solve this? ...

Closing and Opening Frames in wxPython

I'm working on writing a very simple client/server application as an excuse to start learning network/gui programming in python. At the moment I'm stuck on transitioning from my login frame to the main frame of the application. The login frame is a subclass of wx.Frame, and basically I just want to close it and open the main frame when...

How do I detect when my window is minimized with wxPython?

I am writing a small wxPython utility. I would like to use some event to detect when a user minimizes the application/window. I have looked around but did not find an event like wx.EVT_MINIMIZE that I could bind to. Anyone know of a way that can be used to detect this? ...

How to pop up a minimized wxPython window.

I have a utility where I want it to pop up to the front of the screen from time to time to request user input. (I know it is very annoying general behavior but I have good reasons in this case.) I have found the RequestUserAttention method that can be used for a more pleasant request for input from the user but in my case I just want i...

wxPython: how to implement paste in a grid cell?

bear with me, I've been using wxPython for all of one day now. Short version is, given a reference to a grid.PyGridCellEditor and a string, how can I implement a paste function? This is in the body of a large block of existing code that tries to handle pasting entire rows in a Grid widget, and this block is the special case where the ...

wxpython & threads: How to simulate a trigger of an wx.EVT_BUTTON?

Hi, If I have a 'parent' window (wxFrame), and a plugin window. (parent.py) class App(wx.App): wxctrl = xrc.XRCCTRL( self.x_panel, "BUTTON") wx.EVT_BUTTON(wxctrl, wxctrl.GetId(), self.OnButton) How could I send an event from plugin.py that mimics clicking 'Button'? ...