Questions tagged [wxpython]
wxPython is a Python wrapper for the cross-platform C++ GUI API wxWidgets.
7,107
questions
0
votes
0
answers
4
views
Exporting chart from existing xlsm
I have multiple xlsm files that contains charts. I want to export the charts in png format using python. Found multiple posts to export charts in xlsx but not xlsm. Could someone help me?
0
votes
1
answer
18
views
How to disable the mouse over color change in wxPython
I have a custom button and want to disable the bright highlight color on mouse hover. I have tried to call event.Skip() in the EVT_ENTER_WINDOW, but the highlight color still shows up.
class ...
0
votes
0
answers
12
views
How to force event loop to continue processing events normally when the screen saver turns on
I just now encountered an unexpected and annoying behaviour of wxPython GUI on Mac.
Although the effect makes sense when efficiency is concerned, right now it is hindering my application design.
The ...
1
vote
1
answer
16
views
How can I detect an "unClick" in wxPython?
I want to detect the difference of position between when I left-click in a panel and when I finish clicking (when the left button goes up after the click). I detect correctly the click and I know how ...
0
votes
1
answer
28
views
Pass Wx Frame class as a variable to another Class
I am trying to pass a WX frame class to another class. I have three py files which are as follows:
gui_20220510.py - this contains the gui code
import wx
class Frame_Demo(wx.Frame):
def __init__(...
0
votes
0
answers
20
views
Process finished with exit code -1073740771 (0xC000041D)
I'm trying to figure out what this message means
Process finished with exit code -1073740771 (0xC000041D)
I'm making an application using wxpython. The whole thing is a chat so there are a few ...
0
votes
1
answer
35
views
transient popup with slider wrong value when mouse is over parent panel using wxPython
OS: Linux (Fedora 35)
Python: 3.10.4
wxPython: 4.1.1 (gtk3, released 2020-11-21)
wxWidgets: 3.1.5 (released 2021-04-14)
Using wxPython, I'm trying to have a PopupTransientWindow show a slider, ...
1
vote
3
answers
33
views
Find all nested SizerItems within a Frame in wxPython
In wxPython, I am trying to adjust the border of items within a form on startup programatically in order to support higher DPI displays a bit better. I want to do is loop through each item in the ...
0
votes
0
answers
11
views
Python3 and wxpython
I cannot set up wxpython with pydev. In a python2 project I have had an external library /usr/lib/python2.7/dist-packages/wxPython-4.0.1-py2.7-linux-amd64.egg and it works fine. However, using the '...
1
vote
1
answer
48
views
Creating an animation showing a line dropping vertically using wxPython
I wrote a code showing a line dropping vertically using wxPython. The issue Iam facing is when I keep the same y-coordinate (y2=y4 :drawing horizontal line on frame), the line is not visible on the ...
0
votes
1
answer
24
views
wxPython how to move items to new row if they become hidden?
I have a collection of buttons arranged in a row.
Here is a simplified example of my code:
import wx
app = wx.App(False)
frame = wx.Frame(None)
panel = wx.Panel(frame, wx.ID_ANY)
box = wx.BoxSizer(...
0
votes
0
answers
23
views
python When press TAB then mouse cursor can move to next textctrl -wxpython
I use wxpython to do that when press TAB then can move cursor from textctrl_1 to textctrl_2 , how to do this?enter image description here
1
vote
1
answer
59
views
Exception occurs while importing wx on M1 machine
I installed wxPython version 4.1.1 from pip3 and my python version is 3.8.9 on a M1 processor running MacOS Monterey.
Importing wx results in the following exception:
Traceback (most recent call last):...
0
votes
1
answer
37
views
Python 3.7.9: wx.Locale & GetLocale() gives ValueError: unknown locale: en-GB / fr-CH
When using datetime.strptime() within a wx.App() I am receiving a value error: Unknown locale: en-GB or fr-CH
I am using Python 3.7.9 & wx 4.1.1 on windows 10.
Using wx.Locale() seems to cause ...
1
vote
2
answers
32
views
wxPython How to correctly close wxProgressDialog when set to Pulse()
I have recently migrated an application from python2.7.15 (wx 3.0.2.0) to python 3.7.9 (wx 4.1.1)
The application uses a wx.ProgressDialog set to Pulse() while waiting for some tasks to complete
and ...
0
votes
1
answer
34
views
How can I add elements to a sizer in wx.Python without having to resize the frame?
I'm developing a project for the university but I don't find a way to add elements to a GridSizer and show them in their position without having to resize the frame. I would want to have predefined ...
0
votes
2
answers
41
views
wxpython figure.canvas.mpl_connect() not work for interactive plot
import wx
import matplotlib.pyplot as plt
import numpy as np
from numpy.random import rand
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from matplotlib.backends....
2
votes
1
answer
19
views
wxpython widgets resizing not properly when selecting different choices
import wx, wx.lib.mixins.listctrl as wxlc
import wx.lib.buttons as buttons
from datetime import date
today_date = date.today().strftime('%Y %m %d')
class BetaFrame(wx.Frame):
def __init__(self, ...
2
votes
1
answer
29
views
I'm having problems embedding an html file into wxpython
I am creating a GUI element to visualize graphs generated using PyVis. PyVis outputs the graphs into an html file. You can open this file in a browser to see a fully interactive graph which looks like ...
0
votes
1
answer
15
views
wxpython widgets not showing properly on split window
import wx, wx.lib.mixins.listctrl as wxlc
class Frame(wx.Frame):
def __init__(self, parent):
super().__init__(parent, -1, title='My Split Panel', size=(1000, 650))
self.initpos = ...
0
votes
1
answer
290
views
Pip cannot install wxPython for Python 3.10 (32-bit)
I have installed two frameworks of Python 3.10. There is wxPython310 for 64-bit Python. But there aren't any wxPython for 32-bit Python.
I tried to install wxPython with https://wxpython.org/Phoenix/...
0
votes
0
answers
44
views
how to do search in CheckListBox
I want to create a customized dialog like Excel filter fucntion.
when search bar change then below checklistbox will update, and checklistbox can be multiple selection.
And now I have create a dialog, ...
0
votes
1
answer
36
views
Wx overlay frame how to put text or image
I make a application that show me a little square of overlay with wx. and i hide it when something happen with Hide(). How i can write inside or put a image inside this box?
import wx
class Skill(wx....
0
votes
0
answers
22
views
wxPython Transparent Bitmap on Custom Control with PaintDC
I am writing a custom button control in wxPython 4.1.1 on Python 3.9.12 using MacOS 12.2. The custom button uses a bitmap background with text written on it. The bitmap is transparent so parts of ...
0
votes
0
answers
20
views
wxPython: How can I display information from a database with information from a url?
I am doing an assignment for my python class and I cannot figure out where to go from here. I have tried asking, but did not get an answer. I made a GUI using wxPython to display stock information ...
0
votes
0
answers
17
views
SetMinimumPaneSize hides the panel located under the sash for a MultiSplitterWindow
I have the following code which generates a MultiSplitterWindow with four panels:
import wx
from wx.lib.splitter import MultiSplitterWindow
class SamplePanel(wx.Panel):
def __init__(self, parent, ...
0
votes
0
answers
12
views
WX Listcontrol does not display full line of text
Working with wxpython on a mac and when I display a line of text in a list control, a line with too much text is trailing off with three dots. Is there anyway I can have it show the complete text? ...
0
votes
0
answers
29
views
How to add smaller panel on top of existing panel inside frame? - WXPYTHON
Below I have an example of my code, you can drag and drop an image from your desktop into the window and it will change the image in the app. I want to only drag/drop images into the image, not the ...
1
vote
0
answers
20
views
wxPython: How can I display time into my wxFrame?
I am trying to make a program that displays stock information and displays the total loss or gain and the date and time. It is for a python assignment and I have been working on this part alone for a ...
0
votes
1
answer
35
views
Prevent title/toolbar inlining on macOS using wxPython
With
tb = myFrame.CreateToolBar()
tb.AddTool(wx.ID_ANY, 'A', wx.Bitmap("plus.png"))
tb.AddStretchableSpace()
tb.AddTool(wx.ID_ANY, 'B', wx.Bitmap("plus.png"))
tb.Realize()
I get
...
0
votes
1
answer
21
views
Draw in wx.PaintDC
I am trying to create a canvas and draw on it based on the position of the mouse cursor.
Example:
class Lienzo:
def __init__(self):
super().__init__()
self.app2 = wx.App()
self.ventana2 ...
0
votes
1
answer
53
views
Show matplotlib plot in a wxpython panel and update on button push
I am trying to plot 1D txt files in a part of the window created using wxpython. For this purpose, a directory selection tool was included which lists all txt files. Now, I would like to select a txt ...
0
votes
1
answer
27
views
Exiting a wxPython application with multiple windows
My wxPython application consists of a main window and an arbitrary number of secondary windows that the user can choose to launch. When the user closes the main window, I want the application to exit (...
0
votes
2
answers
35
views
How to turn the Frame in this code into a Panel inside of the Frame? WxPython
This is my code. It displays an image, and you can drag and drop and image from your desktop and it will replace the image. Works like I want. But I want to make a GUI and have this inside of it. I ...
0
votes
0
answers
12
views
How do I add a menu item to the "Drop down menu" of auiToolbar in wxPython?
Toolbar Picture How can I do that? Please show me an code example.
I tried to add menu items through wxFormBuilder, but wxFormBuilder crashes when generating Python code, just after adding items to &...
0
votes
0
answers
21
views
wxpython, richtextctrl: How to remove borders in a table?
I want to display a richtextctrl table without borders. I can change some attributes of the table (e.g. font), but I haven't figured out how to change the attributes of the margins. I tried to color ...
0
votes
0
answers
9
views
ModuleNotFoundError for IPython QtConsole in wx app:
I'm trying to get this tutorial to run: https://github.com/jupyter/ngcm-tutorial/blob/master/Part-1/Embedding/ipkernel_wxapp.py
From the description: "This trivial GUI application internally ...
0
votes
1
answer
33
views
How do I enable C++ highlighting in the Scintilla control in the wxPython library?
I'm trying to enable C++ highlighting, but nothing is highlighted.
My code:
self.m_pawnedit = wx.stc.StyledTextCtrl( self.m_panel1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.BORDER_NONE)
self....
0
votes
0
answers
50
views
Can not install WxPython with Python 2.7 on Windows 10
I am new to Python, I want to use the Scyther tool on Windows 10, I downloaded python 2.7 (as requested by the Scyther tool), the problem is I can't install wxpyhton! I tried everything :( Please help....
0
votes
1
answer
36
views
wxPython scrolledwindow in a notebook does not scroll
I want to have scrolled windows on tabs of a notebook. If the window is too small the contents should be scrollable. Everything is laid out correctly if the window is big enough. It also looks ...
0
votes
0
answers
14
views
wxpython MacOS - wx.PopupTransientWindow with search control is dismissed when clicked on search control in popup dialogue
I am implementing a popup with search functionality using wxpython. I used wx.PopupTransientWindow for the same. The implementation works as expected in Windows with style flag - PU_CONTAINS_CONTROLS. ...
0
votes
0
answers
33
views
How to change text color of ToolBar tools?
I'm trying to change the color of the text of tools in a toolbar. I can change the background of the toolbar with SetBackgroundColour() but SetForegroundColour() doesn't change anything.
I tried ...
0
votes
0
answers
16
views
How to avoid wxPython ObjectListView going top when refreshing
I've the example app below where there is this ObjectListView.
My final app will have data periodically updated in an other thread and I'd like to refresh periodically the display.
Thanks to Attila I ...
0
votes
0
answers
39
views
Set Column Label Alignment for one specific column header
How to set alignment for specific col header in wxpython?
HEADER COL1 and COL2 has left alignment
HEADER COL3 has right alignment
HEADER COL4 has center alignment
HEADER |COL1 |COL2 | COL3| COL4 ...
0
votes
0
answers
27
views
My wxpython app looks different in conda (linux)
I'm sure it's straightforward, but I cannot get it.
My wxpython app was used to looks like this with the system python interpreter:
But from miniconda it looks like this:
Can somebody explain me ...
0
votes
1
answer
24
views
how to refresh periodically a panel wxPython including several widgets
I'm designing an application with a GUI made with wxPython.
It has basically a frame embedding a notebook with many tabs.
Each tab is a panel class.
For instance on one tab I've an ObjectListView ...
0
votes
1
answer
62
views
while True Loop keeps killing python
It is very possible that this issue has been asnwered often, but Google didnt help me so far, so I am posting it myself. I just started a new little Project where I want to make a chat for my school ...
0
votes
0
answers
10
views
Catching close event to wxpython when the frame just disappear
I have accumulated a few thousand lines of code with wxpthon.
But sometimes the frame crashes.
Is there a way to catch the exceptions that may have caused the crashes ?
I put in the following binding ...
1
vote
1
answer
43
views
build a wxPython wx.Icon from a resource file
I have a wxPython application and I load an icon on the main form in the code like below
icon = wx.Icon()
icon.CopyFromBitmap(wx.Bitmap("icons/sm.ico", wx.BITMAP_TYPE_ANY))
...
1
vote
0
answers
32
views
Python interactive shell combined with wxPython GUI app?
I'm developing a wxPython-based GUI app, but would love to interact with it using an interactive shell. The app is targeted at developers and will be run from a command line.
I know about wx’s own wx....