wxpython

How do I edit the color of a word without generating EVT_TEXT in wxPython?

无人久伴 提交于 2019-12-23 23:39:43
问题 This is one part of a two part question (other part is here) So I'm working with wxPython and PyEnchant trying to get some fancy features going. Specifically, I want my text controls to change the color of mispelled words. I can do this if I bind the following code to a button. (where input is a wx.TextCtrl ) chkr = SpellChecker("en_US",self.input.GetValue()) words = self.input.GetValue().split() wrongWords = [err.word for err in chkr] self.input.ChangeValue("") for word in words: if not word

Dragging and Copying Images in wxPython

故事扮演 提交于 2019-12-23 19:47:33
问题 I am attempting to modify the DragImage demo from the wxPython examples so that instead of just moving the image around, dragging an image produces a new copy which is draggable, while the original "source" image remains. A decent analogy is that the original images are like a set of widgets to choose from; clicking and dragging on any one of those produces a widget for you to place wherever (and this can be done multiple times) while the source widget remains. import os import glob import wx

Python: Attractive, clean, packagable windows GUI library [closed]

自作多情 提交于 2019-12-23 19:20:02
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I need to create a simple windows based GUI for a desktop application that will be downloaded by end users. The application is written in python and will be packaged as an installer or executable. The functionality I need is simple - selecting from various lists, showing progress bars, etc. No animations,

wxPython: Making a frame be on top of everything

妖精的绣舞 提交于 2019-12-23 18:13:05
问题 I want my frame to be always on top, but I want it to be really on top. I want no other windows to hide it, even if they are also "always on top". I'm using wx.STAY_ON_TOP and wx.FRAME_FLOAT_ON_PARENT , but still there are windows that appear on top of mine. Also, the taskbar appears on top of my frame, while I'd like it to be behind my frame. I've tried a lot of things that didn't work, detailed here. Any idea how to make my frame really on top? 回答1: Because their is no standard method in

python: Right Click on list menu not showing item selected

馋奶兔 提交于 2019-12-23 17:49:16
问题 In my ongoing effort to learn more about python, I am trying to add a right click event to my mp3 manager program. What currently works is that it shows the menu and all of the options. What is not working is the functions selected from the menu are not executing as I think they should be. Much of this code was taken from a 'how to' on another site. Here are the right click menu options menu_titles = ["Remove Selection from list", "Delete Selection from system", "Move Selection", "Copy

Error: Failed building wheel for wxpython-phoenix while installing wx

北慕城南 提交于 2019-12-23 17:26:23
问题 I am trying to install wxpython (I have python 3.5.2(32Bit) and Windows 10(64Bit)) I tried : pip install wx and i get: Failed building wheel for wxpython-phoenix 2 times and then a big error line--> I also tried installing Anaconda, but it did not help.How can I overcome the problem ? 回答1: There's a lot of questions about failed installations on windows, probably because the packages are compiled when installed, and sometimes the compilation fail when the compiler is not properly configured.

General zoom algorithm for drawing program

心不动则不痛 提交于 2019-12-23 15:46:14
问题 My GUI toolkit, wxPython provides some methods for implementing a user zoom factor, however the quality isn't too good. I'm looking for ideas on how to create a zooming feature, which I know is complicated. I have a bitmap representing my canvas which is drawn to. This is displayed inside a scrolled window. Problems I forsee: - performance when zoomed in and panning around the canvas - difficulties with "real" coordinates and zoomed in coordinates - image quality not degrading with the zoom

Constrain wxPython MultiSplitterWindow panes

99封情书 提交于 2019-12-23 12:55:18
问题 Edit: I'm leaving the question open as is, as it's still a good question and the answer may be useful to others. However, I'll note that I found an actual solution to my issue by using a completely different approach with AuiManager ; see the answer below. I'm working on a MultiSplitterWindow setup (after spending a good deal of time struggling against SashLayoutWindow layout quirks). Unfortunately, when I create a MultiSplitterWindow , I see some unexpected behavior when dragging the sashes

wxPython ListCtrl Help

点点圈 提交于 2019-12-23 12:52:16
问题 I'm using a ListCtrl and it is populated with items on the fly, when an item is "Activated"(Double Click/Enter) it calls a function. def onClick(self, event): How do I find out which item was clicked in the List since they don't have pre-set IDs? Is the String passed to the function as part of self or event? Thanks. 回答1: Try event.GetText() or event.GetItem().<manipulate your item here> ; here is wx.ListEvent documentation. 回答2: Since you are probably binding the ListCtrl with the event, the

wxpython Timer Event Interval

ε祈祈猫儿з 提交于 2019-12-23 12:02:12
问题 I am trying to write a gui application with wx python and I need to control the interval of the timer event. Here is my code currently: self.timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.on_timer, self.timer) self.timer.Start(750) # start timer after a delay This is the right framework but I cannot control the interval or how often the EVT_TIMER occurs. I have been trying to figure out using the wx TimerEvent class but without any luck. I feel like this should be what I need but it isn