As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [wxpython]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
24 views

wxPython install, attrdict dependency ModuleNotFound error

System Details: Machine: Raspberry Pi Model 4B - 4GB Operating System: Debian 11 (Bullseye) wxPython version: 4.2.0 from pypi Python version: 3.11.3 built from source Problem Description: When ...
stackoverflowing321's user avatar
0 votes
1 answer
25 views

Why is there a difference in behavior between running in debug mode and stepping through code in wxpython GUI library in PyCharm?

Below snippet is cut down version of code I am dealing with. It will behave differently when I run it in debug mode but behaves as I would expect when I step through debug mode. environment: Windows ...
Mike's user avatar
  • 3
-1 votes
0 answers
18 views

Is there a way to import a Python file into wxGlade without a wxg backup?

I have a question about wxGlade, I made an interface and it works fine except that I deleted the backup of the wxg file. Is there any way to transfer a python file to a wxg file or to import it into ...
philzphaz's user avatar
0 votes
0 answers
22 views

How to resize background image in PaintDC in wxPython?

I have a simple wxPython app showing a screenshot in fullscreen. The screenshot resolution matches the actual resolution of the monitor, however after changing the scaling setting in Windows the image ...
seenorth's user avatar
  • 167
1 vote
1 answer
40 views

Installing wxpthon on pydroid3

Error installing wxpthon on pydroid3 I tried using pip to install wxpthon, the build process went well for it's dependencies but it failed to build with some sort of error about a subprocess.
BrightMfonX 's user avatar
0 votes
2 answers
43 views

Terminate thread class mid-execution

In this program, a non-blocking thread is started upon pressing "Start Counter." This starts a thread class called "CountingThread." The thread works as it should (increments by 3 ...
newby73's user avatar
  • 17
1 vote
0 answers
40 views

How to install wxpython without errors?

Collecting wxpython Using cached wxPython-4.2.0.tar.gz (71.0 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit ...
Mercury's user avatar
  • 23
0 votes
0 answers
38 views

ModuleNotFoundError: No module named 'wx'

I have a desktop application written for Python 3.7 and using wx lib. I use pyinstaller library to convert the application to exe desktop application using the following command: pyinstaller --paths ...
Mr. GEMY's user avatar
0 votes
0 answers
18 views

Highlight active cell in wx.grid.Grid even when the grid isn't focussed

I'm using a subclass of wx.grid.Grid that's added to a wx.Frame. The active cell (the one you get by calling wx.grid.GetGridCursorCoords()) is only highlighted (with a grey border) when the grid has ...
z80crew's user avatar
  • 1,140
0 votes
1 answer
67 views

wxPython: Automatically resize the frame to keep free space out

I have a very simple wxPython app which consist of a frame containing: control1 that keeps its aspect ratio on resize. control2 that keeps its height constant and fills the entire width of the frame. ...
Albus Dumbledore's user avatar
0 votes
1 answer
60 views

How do I reference a wxWidget from a separate file?

Inside of one Python file, I have a wx.Frame class called 'MyFrame,' which simply has a wx.StaticText label called 'label_1.' This file contains a subprocess (irrelevant) which runs the second file. ...
newby73's user avatar
  • 17
0 votes
1 answer
26 views

how to set the background color of a RichTextCtrl in wxPython

I have a chatbox and I'm trying to colour every message with a different colour class ChatDisplayer(RichTextCtrl): def __init__(self, *args, **kw): super().__init__(*args, **kw) def ...
Bouji's user avatar
  • 176
0 votes
2 answers
29 views

wxPython: How Come the Panel is Missing TextCtrl and Button When Run?

I have a simple password generator: import wx, string, secrets def main(): app = wx.App() class PwdGenFrame(wx.Frame): pnl = wx.Panel() def ...
xQT314's user avatar
  • 11
1 vote
1 answer
56 views

How to eliminate flickering in a simple image viewer made with wxPython?

I've created a simple image viewer using wxPython, but I'm experiencing flickering when the images are changed using the arrow keys. How can I fix this issue? Here's the code I've written so far: ...
aies_it's user avatar
  • 11
0 votes
1 answer
28 views

Not able to change text dynamically when a button in the toolbar is clicked (wxpython)

I am not very experienced with the wxPython library and am currently developing a personal portfolio application using toolbars and event handling. However, when I click a button in the toolbar, the ...
Krishnan S's user avatar
1 vote
2 answers
255 views

What is the differences between Tkinter, WxWidgets and PyQt, and PySide?

I was wondering what are the differences among the GUI toolkits such as tkinter, wxWidgets and PyQt, PySide. They produces similar widgets like list boxes, text engines, and buttons, check boxes, etc. ...
Tkinter studio's user avatar
0 votes
1 answer
24 views

Why Does the Button Not Size Correctly Until After Adjusting Window Size?

Here's what I have for the GUI: from wx import * # type: ignore class myFrame(Frame): def __init__(self, *args, **kw): super().__init__(*args, **kw) panel = Panel(self) ...
xQT314's user avatar
  • 11
0 votes
1 answer
49 views

Why can the try loop not catch a ParseException from Matplotlib mathtext?

wxPython 4.2.0 x Matplotlib 3.6.0 I'm working on a GUI where the user can write a figure title in a textctrl, then this title is set on a figure and the figure is shown. My current problem is that I ...
roural's user avatar
  • 1
0 votes
1 answer
41 views

wxpython aui manager pane's with tabs by default

So I want to two aui pane to be "stacked" or "tabed" like this. However I can't find any documentation that explains how to do this without starting the application and using the ...
Blissed's user avatar
  • 21
-1 votes
1 answer
133 views

Installing GUI wxPython in Visual Studio Code

I'm trying to install wxPython in VisualStudioCode but it is not working. I'll insert here code it gives me: pip install wxPython==4.1.1 >> Collecting wxPython==4.1.1 Using cached wxPython-4....
Mandalorian's user avatar
1 vote
1 answer
44 views

Fatal Python error: PyGILState_Release when writing to a TextCtrl from a RadioBox handler

I have a dialog box with a TextCtrl which has its value modified in a RadioBox handler. When running the code, the first click on the radio button is okay, but clicking a second time I get a "...
Dion Kant's user avatar
0 votes
1 answer
44 views

How to update an embedded matplotlib plot in a wxFrame?

I'm trying to create an app composed of a vertical wxplitter with two panels (Inputs_Panel and Plotting_Panel), in which the left is for reading inputs and the right to plot those inputs. Based on ...
TMoover's user avatar
  • 620
0 votes
0 answers
41 views

Built an app with wxPython to send requests to REST API using Windows auth, but the app gets stuck at requests.post when compiled

I tried to build an app (see a simplified version below) using wxPython that sends requests to a REST API endpoint using the requests package and the requests_negotiate_sspi package for Windows ...
Alex's user avatar
  • 4,000
0 votes
0 answers
36 views

How to test function inside python wx app?

I'm trying to test a simple function (check_empty) that checks if some wx.filepicker widgets inside a wx.app are empty strings. def check_empty(input, msg): if input == '': wx.MessageBox(...
TMoover's user avatar
  • 620
1 vote
1 answer
76 views

Import error when importing wx on Apple silicon

I have a Python 3.8 project that was created on a Intel Mac that I'm trying to get working on my Apple silicon M2 MacBook Pro. wxPython installed fine using brew, but importing wx causes the following ...
GTI13's user avatar
  • 11
0 votes
0 answers
41 views

Move selection on wxPython DataViewListCtrl using hotkeys when sorted

I have a wxPython 4.2.0 app that includes a DataViewListCtrl and some other widgets. The app has global hotkeys of CTRL+K/J that move the DataViewListCtrl selection up and down respectively, just as ...
rimkojr's user avatar
  • 104
0 votes
1 answer
32 views

wx.FilePickerCtrl SetBackgroundColor of File/Path box instead of entire object

I have a wxFilePickerCtrl & am trying to colour the filepath/text background e.g. when the filepath no longer exists. tcf_entry = wx.FilePickerCtrl(myframe, message="Select File", ...
GabboCH's user avatar
  • 23
0 votes
0 answers
59 views

wxPython Window runs slow when thread loop is running in background

I have a chat program I made that works the way I want it, but it runs really slow. For instance, when a few chat messages get added to the window, resizing the window gets really slow and laggy. The ...
LoganAC34's user avatar
0 votes
1 answer
32 views

GetPosition in WxPython not returning the correct position

I'm developing a user interface using WxPython, and I need to record two points manually selected on a StaticBitmap. This is in the function on_left_click() below. import wx import cv2 import numpy as ...
Danny's user avatar
  • 13
0 votes
1 answer
51 views

wx.StaticText's label does not contract using SetSizerAndFit()

I'd like to place a filename after the file is chosen and contract it if the file name is too long. Here is my code: import wx class Dlg(wx.Dialog): def __init__(self, *args, **kwargs): ...
Deeproad's user avatar
0 votes
1 answer
65 views

How to create a help button within a dialog using wxpython?

Is it possible to create a help button that sends user to a web page (just like in MS Word, see below)? wx.Dialog's wx.DIALOG_EX_CONTEXTHELP flag puts a query button on the caption, but it makes ...
Deeproad's user avatar
0 votes
0 answers
24 views

How can I render wxPython panels inside the Psychopy window?

The backend selected for Psychopy window is unimportant, I just need to render complex user interfaces within a Psychopy experiment workflow.
ivan866's user avatar
  • 554
6 votes
1 answer
5k views

pip wxpython gives ModuleNotFoundError: No module named 'attrdict'

Installing wxpython with pip gives the error ModuleNotFoundError: No module named 'attrdict' Details: py -3.10-64 -m pip install -U wxpython Collecting wxpython Using cached wxPython-4.2.0.tar.gz (...
Bernard Vander Beken's user avatar
0 votes
1 answer
31 views

Import 2 wx windows from each other

Imagine that we have 1.py and 2.py as a main window and a sub window, and we want to create a button to navigate between them. For an explanation of the idea see the code: 1.py (the main window): ...
ibraheem mohsen's user avatar
0 votes
1 answer
24 views

wxpython is there any way to change the textcolor according to if statements?

How can I format the text in the self.verify box according to the conditions entered in the onsend function where if the first condition is met (the answer is true) the text in the self.verify box is ...
ibraheem mohsen's user avatar
1 vote
1 answer
110 views

Shape drag and Drop in wxPython

I am trying to create a drag and drop app (like how the Unreal engine does with events - e.g. here) in Python using wxPython Phoenix. I have found this Stack Overflow question which I have figured out ...
Swatcat's user avatar
  • 43
0 votes
1 answer
45 views

wxpython combobox value is not changed once selected

I have wxpython code (wxpython version: 4.2.0). It has two Comboboxes to select value of x and y, and list of values for y is determined by x. self.x = wx.ComboBox( self, wx.ID_ANY, "x", wx....
Gilseung Ahn's user avatar
  • 2,553
0 votes
1 answer
35 views

When does wxpython event object get declared within the Bind and event handling logic?

I have working wxpython code, but I don't understand some logic. In the code, a scroll event is assigned to an 'OnSliderScroll' event handler. sld.Bind(wx.EVT_SCROLL, self.OnSliderScroll) ...
user2438292's user avatar
1 vote
1 answer
42 views

How to make wx not block as focused window [Python]

I made an overlay in wxpython which I use to display a bitmap on my computer. However, when I integrate it into an app that takes focus on a screen and moves my mouse, it blocks the app and never goes ...
Jérémy Talbot-Pâquet's user avatar
0 votes
0 answers
22 views

WX.Frame combaine with customtkinter.CTk?

Hi guys issue is the following: I have working desktop application written on Python with the help of wx.Frame. It works fine but looks really bad. As ussuall WX.app. I would like to redesign somehow. ...
Ferenc Kulákov's user avatar
1 vote
1 answer
94 views

How to add new rows to wxpython grid, when vertical progress bar is scrolled to the end of grid

At the launch of the program I want to load Wx.Grid with 5 cols and 1000 rows. And, I want to append 1000 rows again, when vertical scrollbar of wx.grid is scrolled to end of grid. So, I'm trying to ...
tarun_b's user avatar
  • 15
0 votes
0 answers
31 views

Is there a way in wxPython to detect RTF format text on the clipboard?

I'm currently implementing paste from the clipboard in a wx.grid.Grid derived class. All works fine except for pasting from Excel on a Mac, where the data string converted from the clipboard using a ...
doctorafternoon's user avatar
0 votes
2 answers
76 views

Opening a window on top of other windows

How to open a window on top of other windows when calling a function? import wx def openFile(wildcard="*"): app = wx.App(None) style = wx.FD_OPEN | wx.FD_FILE_MUST_EXIST dialog = ...
Ms.kitty's user avatar
0 votes
0 answers
26 views

Why does import wx throw an error on python?

I’m developing a bot over discord to open a webpage remotely (my company site, over a tv). I am basing it off of another bot I found. Here is a code snippet: import wx import wx.html2 class ...
Kevin Lin's user avatar
0 votes
1 answer
69 views

Segmentation Fault running wxPython 4.20 on macOS Monterey with Python 3.9 or 3.10

I am trying to use wxPython 4.2.0 I have python 3.9.12 and 3.10.7 on my system and the results are identical with both. It's a 2021 MacBook Pro with an M1 chip. I cannot run even the simplest app as ...
Gareth Simpson's user avatar
0 votes
0 answers
31 views

import wxPython fails when executing program with sudo

I have an application.py that reads and writes to /dev/ttyUSB0 so it needs to be run as sudo to access the serial port. The application also uses wxPython (top of the program uses import wx) The ...
Walt's user avatar
  • 117
1 vote
1 answer
81 views

wxPython StaticText in class not updating

I have a simple local network chat program with a chat log that is a wx.StaticText object and I'm having issues with it not updating when I set the label. I had it working previously with just self....
LoganAC34's user avatar
1 vote
0 answers
191 views

cefPython pyinstaller build ERROR: icu_util.cc(133) Invalid file descriptor to ICU data received

I have a problem with build my project on - windows 11 - python 3.9.13 - pyinstaller 5.7.0 - wxpython 4.2.0 - cefpython 66.1 everythings are 64bit and no problem "python BuildTest.py". it ...
JH Bok's user avatar
  • 11
0 votes
0 answers
33 views

wxpython `GetScrollPos` with ULC not working

Hi I have this code : import wx import wx.lib.agw.ultimatelistctrl as ULC class UltimateListCtrl(ULC.UltimateListCtrl): def __init__(self, parent, ID=wx.ID_ANY, pos=wx.DefaultPosition, size=wx....
yam ka's user avatar
  • 31
0 votes
0 answers
62 views

wxpython editable ultimate listctr for one or two columns

I want to make an ultimate listctr (Not listctr But an ultimate listctr which import from agw from wx.lib.agw import ultimatelistctrl as ULC). using wx python which editable for only one or two ...
yam ka's user avatar
  • 31

1
2 3 4 5
145