wxpython

Autocompletion in Pydev- Eclipse for wxpython

大憨熊 提交于 2019-12-11 13:14:42
问题 How can I activate autocompletion feature for wx classes in pyDev? I cannot find anything to prompt me to change that will activate this feature from PyDev>Preference>Autocompletion. How can I get autocompletion from packages like wx and other third-party packages? Update: I added wx path in configuration to pyDev and it now shows autocompletion for wx. However, I cannot see the method arguments and properties. For example if I seek for wx.Button, I just get autocompletion to complete writing

How do you get checkbox selections from a CustomTreeCtrl

为君一笑 提交于 2019-12-11 12:47:45
问题 I'm working with a CustomTreeCtrl with checkboxes and I can't figure out how to determine which checkboxes are selected. I looked at http://xoomer.virgilio.it/infinity77/wxPython/Widgets/wx.TreeCtrl.html#GetSelection and put this together: import string import os import sys import wx import wx.lib.agw.customtreectrl as CT class MyFrame(wx.Frame): def __init__(self, parent): wx.Frame.__init__(self, parent, -1, "CustomTreeCtrl Demo") custom_tree = CT.CustomTreeCtrl(self, agwStyle=wx.TR_DEFAULT

wxpython: app not exiting when window is closed

自作多情 提交于 2019-12-11 11:56:45
问题 My app is not exiting mainloop after closing my application's main window. why is it not printing "finished" after I close the window? Here is my code: import wx import numpy as np import matplotlib matplotlib.use('WXAgg') import matplotlib.pyplot as plt from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas class GraphFrame(wx.Frame): def __init__(self): self.displaySize = wx.DisplaySize() wx.Frame.__init__(self, None, -1, style = wx.DEFAULT_FRAME_STYLE, size = (self

Word wrapping in a ListCtrl (or ObjectListView)

若如初见. 提交于 2019-12-11 11:52:24
问题 I have a wxListCtrl (Actually it's an ObjectListView), set with LC_REPORT with two columns. Is it possible to word wrap the first column of text when it reaches the end of the column? 回答1: It's not possible with a ObjectListView (see their FAQ), because ListCtrl doesn't support multiline entries. It is possible, however, using UltimateListCtrl import wx from wx.lib.wordwrap import wordwrap import wx.lib.agw.ultimatelistctrl as ULC class Frame(wx.Frame): def __init__(self, *args, **kw): wx

Unable to destroy wx.Dialog in wxpython

混江龙づ霸主 提交于 2019-12-11 10:57:38
问题 After launching a process using subprocess.Popen() as shown, I would like to create a busy-window (wx.Dialog) with an "Abort"-button. This works as intended; however, in the case where the process is given the time needed to finish, the busy-window should be destroyed. In the code shown below, this does not happen? import subprocess import wx ProcessToCall = [Some, process, with, some, arguments] Process = subprocess.Popen(ProcessToCall) BusyDialog = wx.Dialog(...) if BusyDialog.ShowModal() =

How can I determine the max allowable WX_GL_DEPTH_SIZE for a wx GLCanvas?

ぃ、小莉子 提交于 2019-12-11 10:09:46
问题 I am creating a wx.Frame with a GLCanvas . On some platforms, setting the WX_GL_DEPTH_SIZE attribute of the canvas to 32 works fine. On another platform, I just get a blank frame (the GLCanvas doesn't render) unless I reduce the depth size to 16. Is there an easy way in the calling code to determine the allowable values for the depth size? 回答1: The only solution I found is to use GLCanvas method IsDiplaySupported, however it seems that this method is available in wxPython 2.9 and not older

Unable to install older wxPython within virtualenv (Cannot unpack file / Cannot determine archive format)

ⅰ亾dé卋堺 提交于 2019-12-11 10:03:24
问题 Within a virtualenv built off Python 2.6.6, I'm trying to pip install the 2.8.10.1 2.6 unicode dmg found here thus: pip install -Iv http://sourceforge.net/projects/wxpython/files/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.dmg/download Granted, the URL is a bit of a guess. I get (dividing the log in two): MacBook-Pro-de-Pyderman:Pyderman$ pip install -Iv http://sourceforge.net/projects/wxpython/files/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.dmg

How to use matplotlib blitting to add matplot.patches to an matplotlib plot in wxPython?

浪子不回头ぞ 提交于 2019-12-11 10:02:46
问题 I am making a plot using the matplotlib library and showing it in my wxPython GUI. I am plotting a massive amount of data points from a LIDAR instrument. The thing is, I would like to draw rectangles in this plot to indicate interesting areas. But when I draw a rectangle on the same axes as the plot, the whole plot gets replotted which takes lots of time. This is because of the self.canvas.draw(), a function which replots everything. The code gets displayed as follows in the GUI: Printscreen

Application crashed while giving input to wxPython GUI

一笑奈何 提交于 2019-12-11 09:57:13
问题 I am using wxPython API to build an application and it works fine in windows 7. And now I installed wxpython CoCoa3.0 for mac and tried to run the same application. The application crashes when the input is given. I get the following error log. Any help will be appreciated. 7-16 16:06:54.507 Python[2999:d07] An uncaught exception was raised 2014-07-16 16:06:54.507 Python[2999:d07] NSMutableRLEArray replaceObjectsInRange:withObject:length:: Out of bounds 2014-07-16 16:06:54.508 Python[2999:d07

Run thread in main window for both Windows and Linux

為{幸葍}努か 提交于 2019-12-11 09:43:44
问题 I am creating a game to run inside a GUI (text area, button, menu etc) I've created a GUI with wxpython. I create a panel inside the main window, which runs a pygame thread. Problem: On Windows, the pygame thread runs perfectly inside the main window. But on Linux, the pygame pop up on a new window. How can I set this such that both windows and Linux run the thread in the main window? Code: class SDLPanel(wx.Panel): def __init__(self,parent,ID,tplSize): global pygame global pygame_init_flag