Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [wxpython]

wxPython is a Python wrapper for the cross-platform C++ GUI API wxWidgets.

0
votes
0answers
6 views

Scroll in wx.Panel

There is an object: self.m_panelDraw = wx.Panel(self.panel, -1, size=(400, 150), style=wx.SUNKEN_BORDER|wx.TAB_TRAVERSAL|wx.FULL_REPAINT_ON_RESIZE) I want to add a SVG document to this object: ...
-1
votes
1answer
10 views

wx Module misses attribute ArtProvider

I am adapting a model in SUMO and try to run a file (sumopy_gui.py). When doing so I get the following error message: AttributeError: module 'wx' has no attribute 'ArtProvider_GetBitmap' I tried ...
0
votes
0answers
29 views

Is it possible to select a locked file in wx.FileDialog?

I have the following code which opens a FileDialog. I'm running WX 2.8.10.1. dlg = wx.FileDialog( parent=self, message="Select TIA Portal project", ) dlg.ShowModal() I'm ...
0
votes
0answers
24 views

argparse does not work with Cython on Windows

I am writing a Windows app. using Python/Cython and compiling using MingW GNU C compiler and an MSYS2 terminal. The small snippet code below shows the issue: import argparse if __name__ == "...
1
vote
1answer
38 views

How do I make a find dialog in StyledTextCtrl?

There is an existing question on this subject: Find text dialog with wxpython, but it's in TextCtrl. So I changed the TextCtrl to StyledTextCtrl, and tested it. But I got this error: in ...
0
votes
1answer
41 views

Why does a TextCtrl above a Bitmap only be visible after the mouseover?

I have an TextCtrl on top of a Bitmap and when i access this panel, the TextCtrl is invisible and only be visible after the mouseover. If I put the image in front of the TextCtrls, the fields appear ...
0
votes
2answers
115 views

After the EVT_KILL_FOCUS event is executed, why does the blinking cursor in TextCtrl disappear?

I have a TextCtrl that has an EVT_KILL_FOCUS event that I use to validate the contents of the field, alerting the user when the value is wrong. After opening the MessageBox, I clear the field and i ...
0
votes
1answer
40 views

Why is a ScrolledPanel inside a Treebook not resized automatically?

As I need scrollbars I changed the default Panel by a ScrolledPanel, but the content I inserted inside ScrolledPanel does not make it auto-size according to the size of the window. I then tried to ...
1
vote
2answers
4k views

How to set icon on wxFrame?

How can I add an icon (.ico file) to a wxFrame? I was looking in the docs but can't find any mention of icon. Thanks!
0
votes
1answer
20 views

How to delete page of AuiNotebook?

I created frame with AuiNotebook and redefine EVT_AUINOTEBOOK_PAGE_CLOSE event where DeletePage is called: def OnAuiNotebookPageClose( self, event ): auinotebook = event.GetEventObject() ...
-1
votes
1answer
15 views

I knew how to change a grid cell to a combobox by using wxpython GridCellChoiceEditor,but don't know how to bind for this combobox

this is a part of my code. class AboutRelatedDialog(wx.Dialog): def __init__(self,parent,list1,list2,list3): wx.Dialog.__init__(self,parent,-1) RelatedGrid = gridlib.Grid(self) ...
141
votes
18answers
147k views

Programmatically generate video or animated GIF in Python?

I have a series of images that I want to create a video from. Ideally I could specify a frame duration for each frame but a fixed frame rate would be fine too. I'm doing this in wxPython, so I can ...
0
votes
1answer
8k views

no module wxPython

I am using windows 8.1, 64 bit with python 2.7, and trying to import wxPython, which I downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/ I installed it using pip I have a wx and wxpython ...
0
votes
0answers
16 views

Multiple Forms For One Database

I have a database containing just over 100 tables. I have developed multiple summary forms to access various related tables. I now want to build a overview form to specify a search which will then ...
0
votes
1answer
20 views

How to force a widget down in wxPython

I am building GUI for my python project with wxWidgets (wxPython). There is a little but annoying problem I can't seem to figure out. The three buttons START, CROSS and BROWSE should be at the bottom ...
0
votes
0answers
73 views

How can I get the chosen Select Box's Labels from the main function using wxPython?

I'm sorry for my bad question.I struggled to post my source code because of indent errors. 1.My environment Python 3.6.3 |Anaconda, Inc.| (default, Oct 6 2017, 12:04:38) [GCC 4.2.1 Compatible ...
0
votes
0answers
8 views

how to interactive with ssh in wxpython?

Environment ubuntu 16.04 python 3.6.6 wxpython 4.0.3 What i want to do i want to use ssh in wxpython. the gui show below. i want show ssh output in up textctrl, and enter command in down textctrl. ...
0
votes
0answers
23 views

When switching panels in wxpython the panel layout is not preserved

My question is essentially the same as this question: Why Does .Hide()ing and .Show()ing Panels in wxPython Result in the Sizer Changing the Layout? No final code snippet was shown and I don't ...
0
votes
1answer
44 views

How to add a marker on wx slider?

I am developing a python GUI script which required a function to be plotted. I need my plot to vary in real time when I vary certain parameters in the slider. That's not a problem and I successfully ...
0
votes
1answer
31 views

wxPython event from user selecting text in field?

How do I capture the start and end points of a user's text selection in widgets such as wx.TextCtrl, wx.lib.editor, wx.richtext, and wx.stc ? What event should I bind to? I'm just learning wxPython ...
0
votes
1answer
70 views

wxPython: wx.EVT_LEAVE_WINDOW is called when entering a child control

I'm trying to bind events to increase the opacity only while the mouse is present over a window, however the opacity is reduced whenever the mouse hovers over a child control self.Bind(wx....
3
votes
1answer
32 views

Python TypeError: CommandEvent.GetString(): too many arguments

I am currently making a UI in python using wx. I am trying to have multiple tabs active at the same time, but at the same time I am trying to keep either a list or int value active and showing in the ...
1
vote
1answer
23 views

wxPython gauge freezes on Linux

I'm struggling with wxPython on Linux. After a lot of time and investigation I have reduced my program to the minimum to show you one of the issues I have encountered. I could reduce it to a quite ...
0
votes
1answer
20 views

How do I make my text editor's window transparent?

I'm working on a text editor and I would like the menu to have a menu option to make the window transparent such as this. Here is my text editor: import wx import wx.stc as stc class Window(wx.Frame)...
0
votes
3answers
55 views

wxPython 4: detection of double keystroke

Is there a way with wxPython 4 to recognize double pressing the same key? Especially in my case, I would like to recognize when the SHIFT key is pressed twice in quick succession.
0
votes
1answer
19 views

Error with print dialog in wxpython

Here is my code: def Print(self, e): data = wx.PrintDialogData() data.EnableSelection(True) data.EnablePrintToFile(True) data.EnablePageNumbers(True) data....
1
vote
1answer
33 views

Python filtering a parameter in *args **kwargs

I am writing a GUI in wxPython, and am creating a custom control for displaying a terminal window, as I have not been able to find one currently in existence. My control TerminalCtrl extends upon wx....
0
votes
1answer
22 views

Wxpython: How to use different border color for Search box

I am using wx.SearchCtrl and I need a red border around the search field. In the documentation, I could not find anything to do this easily. How can I do this?
1
vote
1answer
23 views

wxPython , Button size not working

I am using python 3.6 , wxPython '4.0.3 msw (phoenix) wxWidgets 3.0.5' on Windows 10. I am trying to set the size of the button but it is not working. The size of frame was changing but not that of ...
0
votes
1answer
53 views

wxPython GetBackgroundColour() function works differently on linux and windows platforms

I want to create an image in a wx Python application with the colour of the background. [EDIT] On Windows this works perfectly: [/EDIT] but on linux my code gives a paler colour. What am I doing ...
1
vote
0answers
36 views

Wxpython. wx.richtext.RichTextCtrl. List of URLs

There is an object: self.m_textCtrl_text = rt.RichTextCtrl(self.panel, -1, self.text, wx.DefaultPosition, (500, 100)) Periodical I insert in it hyperlinks: urlStyle = rt.RichTextAttr() urlStyle....
0
votes
0answers
20 views

How to create usable multiple cursor in StyledTextCtrl when using wxpython?

I want to add multiple cursor feature to my wxpython application. I'm using StyledTextCtrl as my text control. I already make it look like multiple cursor, see below image. However, when I type text, ...
0
votes
0answers
15 views

How to compile and build python library such as wxPython, pymesh, getfem using CMake, mingw and msys and build it for release and debug

I want to compile and build python libraries such as wxPython, PyMesh, GetFEM for python 3.6 using CMake, MinGW and MSYS and build it for release and debug. I build an application which has a command ...
8
votes
3answers
3k views

Python GUI App Distribution: written in wxPython, TKinter or QT

My question is about the easiness of distributing the GUI app across the platforms (Mac/Linux/Windows), and I want to know the one that makes the user's job easiest. My current understanding is that ...
1
vote
1answer
28 views

Bind “Enter” key to WXPython Button with Focus

I'm trying to make a series of buttons navigable with the arrow keys and enter key. I have the arrow keys implemented easily enough, but I can't seem to find the answer online how to bind the ...
0
votes
0answers
13 views

wxPython GetBackgroundColour() function on linux and windows platforms [duplicate]

I have asked a similar question before but unfortunately no one was able to help me. I want to create an image in a wxPython application with the colour of the panel background. The problem is, that ...
43
votes
8answers
41k views

wxPython for Python 3

Does wxPython have a version for Python 3? If it does, where can I get it?
0
votes
0answers
14 views

matplotlib subplots_adjust() not work in wxpython panel

I want to change subplots (left bottom right top wspace hspace)in panel with wxpython, but it didn't work. but only use matplotlib, It works well.(I want to change subplots (left bottom right top ...
0
votes
0answers
16 views

wxPython line spacing TextCtrl

I am currently writing a program, where I want there to be no space between one line and the next in a TextCtrl widget. I have tried using the property when defining the TextCtrl widget (wx.TextCtrl(...
0
votes
1answer
28 views

buttons and a refreshing display area in wxpython

I am a humanities teacher, trying to adapt a simple app to help teachers manage classroom interaction - it takes attendance, then allows for calling on random attending students in class, or breaking ...
0
votes
1answer
16 views

Closing wxPython app on a separated thread runs into a window alert

I have a Flask-SocketIO server, which initialize a GUI in a separated thread. if __name__ == '__main__': if len(sys.argv) > 1 and sys.argv[1] == 'dev': print "Running Flask-SocketIO ...
1
vote
2answers
542 views

matplotlib.pyplot in a wx.Panel

In the .__init__() for this class, I have the lines: class report_order_totals_by_photographer(wx.Panel): def __init__(...): ... self.figure = matplotlib.figure.Figure() ...
0
votes
1answer
30 views

What is the opposite of SetDefault() in wxPython 4?

In a simple GUI, I use SetDefault() on a button when the user has filled in the necessary text fields so that it's obvious that if the user now presses the return key, the button will be pressed. How ...
1
vote
2answers
1k views

Changing Label in toolbar using wxPython

I currently have a toolbar in wxpython with an start icon. I want it so when this icon is clicked the icon and method that it uses changes to stop. This is the code that I have so far: #!/usr/bin/...
1
vote
2answers
34 views

wxPython multiline password field

In wxPython, the password style works only for single line text controls. I need a multiline password field. I've thought of two ways: I've created a font with a single glyph (solid dot) in every ...
0
votes
1answer
27 views

Setting properties for table and cell in RichTextctrl

I am able to write a Table on RichTextctrl using RichTextctrl WriteTable Method. https://wxpython.org/Phoenix/docs/html/wx.richtext.RichTextCtrl.html#wx.richtext.RichTextCtrl.WriteTable def ...
1
vote
0answers
31 views

GUI plot refreshing incorrectly on wxpython panel

Ok, so I've been tasked with creating a VERY simple GUI at work (I'm an intern). The task is to eventually connect to a machine and process real data, but right now I'm working on randomly generated ...
3
votes
1answer
1k views

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

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 ...
0
votes
0answers
11 views

Data validation of wx.ListCtrl TextEditMixin

Is there a method of validating data input in a ListCtrl's TextEditMixin or an elegant way of reverting the data in validation fails. The issue, is that one can type anything whatsoever into the ...
0
votes
1answer
10 views

wxPython wx.FileDialog does not show wildcard filter on MacOS

Using wxPython (3.0.2) on MacOS (10.13), I would like to open a file dialog with a wildcard filter. To do so, I tried the following snippet: import wx app = wx.App() frame = wx.Frame(None, -1, 'win....