Questions tagged [wxpython-phoenix]

1

votes
1

answer
36

Views

Labels not displaying - why? - Using wxPython-Phoenix

I'm trying to create a simple graphical interface with wxPython-Phoenix but the widgets are not displaying and I'm not sure why. I have choose to use wx.FlexGridSizer() as the sizer to handle the widgets positioning. Attached is my code: class App_Frame(wx.Frame): def __init__(self,title=''): #Conta...
Andy
1

votes
0

answer
64

Views

WxPython PropertyGrid Show the Time

I found this to show date on property grid: pg.Append( wxpg.DateProperty('Date',value=wx.DateTime.Now()) ) How can i show the time instead ? Something like HH:MM:SS with a scroller. Thanks
schanti schul
1

votes
1

answer
168

Views

WxPython Phoenix TaskBar Icon

Hello I need to make a app, with a icon in systray for Windows. I use Python3 with wxPython Phoenix. I found code example like: example 1 or example 2 or exemple 3 But is out-dated (or for Python2.x), now wxPython use wx.adv for icon in taskbar, and I have trouble with the doc for WxPython Phoenix....
Maladra
1

votes
0

answer
23

Views

wx.AcceleratorEntry with non alphanumerical characters

Is it possible to use 'wx.AcceleratorEntry' whit non alphanumeric characters? If yes what I'm missing? I've checked the documentation for wx.MenuItem.SetItemLabel which says 'The accelerator may be any alphanumeric character' but if I try to set the accelerator to some other character for example (,...
Tomez
1

votes
2

answer
73

Views

Create a wxPython app that has only one instance

I would like to create a wxPython app such that: If I run a second instance of that app (e.g., call the Python script from the shell a second time), no new instance should be created. Instead, the toplevel frame of the already running instance should be raised and focussed. The first point can be ea...
Dominique Unruh
1

votes
1

answer
21

Views

How to get ride of empty squares in wx.dataview.TreeListCtrl

I am using the following code to create a TreeList: tree = wx.dataview.TreeListCtrl(self, -1, style=wx.TR_DEFAULT_STYLE | \ wx.TR_FULL_ROW_HIGHLIGHT | \ wx.TR_EDIT_LABELS tree.AppendColumn('Item Name') node = tree.AppendItem(parent_node, text) And for some reason there's an empty square (see image b...
Gabrielle
1

votes
0

answer
48

Views

wx.ScrolledWindow scrollbar is going to the top after closing subframe

In my app I need to make around 150 dynamically created panels with descriptions and buttons. Each button will show another url in new window. When you scroll main window for example to middle and click button on panel new frame with url shows. When you close it scrollbar goes to the top of main...
Max
1

votes
0

answer
37

Views

Autocomplete in WxPython Phoenix STC

I am creating a WxPython App which has an STC widget. Basically, it is a code editor which has syntax highlight. But as you know autocomplete is a very important feature in code editors I want to also have it in my editor. The docs list many methods for Autocompletion but don't have any snippet or t...
1

votes
0

answer
29

Views

How to resize Panel (wxPython) after adding to BoxSizer

I want to make a 'mouse over' effect on some panels... When the mouse is over, I want to increase the size of the panel and when mouse leaves, the panel goes back to the original size. I was able to change size but the Box Sizer will not move, so, the max size is limited to the original, and if I de...
Gabrielle
1

votes
0

answer
220

Views

Wxpython installation failed

I'm trying to get wxpython to work with python3.7.0 (32) I installed it using 'pip install wxpython', so I assume that there no compatibility problems. this is the result: Traceback (most recent call last): File 'E:\Scratch\Test.py', line 9, in import wx File 'C:\Python37\wx\__init__.py', line 17,...
Edgar
1

votes
2

answer
46

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 code point. However, I can understand users not wanting fonts installed on their machines willy-nilly...
Den
0

votes
0

answer
4

Views

Text padding inside wx.StaticText

I have a wx.StaticText control inside my wxpython phoenix app. I want the text to appear on a certain background color and have some 'air' or padding around the text. Doing a SetBackgroudnColour(RED) does indeed set the correct background color. But how to give the text inside some more room ?
sanders
1

votes
0

answer
89

Views

Play GIF and Voice together. #wxPython #python3

My code is: import wx import wx.adv import os import threading class MyPanel(wx.Panel): def __init__(self, parent, id): wx.Panel.__init__(self, parent, id) self.SetBackgroundColour('white') gif_fname = wx.adv.Animation('edza_face.gif') gif = wx.adv.AnimationCtrl(self, id, gif_fname, pos=(1, 1)) gif....
Edward Zion Saji
1

votes
0

answer
100

Views

Interactive wizard in wxpython (Phoenix)

I am trying to develop an interactive wizard in wxPython 4.0(Phoenix) with Python 3.7. Basically the wizard has 4 pages(Stages). Each time I click Next, it should run a different Python script by taking the arguments on the page. I need to display the progress of the running of script on the wizard...
pras123
1

votes
1

answer
72

Views

Capturing thread output to redirect it to GUI(wxpython) in Python

I have a GUI built in WxPython. I also have a function in the same python script with embedded JSON objects, which I want to call the function as a thread (Background Process) I want to capture the output of this thread to redirect it to a Multiline text box in the GUI. I was able to do this with su...
pras123
1

votes
1

answer
29

Views

wxpython error on setup - ModuleNotFound: no module named 'wx'

I'm having some trouble getting wxpython working on my mac. Here is a link to a tutorial that I am using: https://realpython.com/python-gui-with-wxpython/#getting-started-with-wxpython The error message I am receiving is on the import of wx: || receiving ModuleNotFoundError: No module named 'wx' ||...
Ru Ba
1

votes
0

answer
7

Views

Minimal wx.FileDialog example freezes program

I'm writing a new application. I used to work with python 2.x and wxPython some years ago, now I got Python 3.7.0 and wxPythonPhoenix 4.0.4 msw (alas). When I try to use wx.FileDialog with ShowModal, the program freezes. I did not find any previous question about this. I used (and reduced for the M...
massi
1

votes
0

answer
12

Views

wxpython-phoenix requires python framework on osx/ipython/pycharm

Running the sample hello-world code offered on wxpython-phoenix website throws a known error on osx. Hints at possible solutions can be found here, and here, but none seem to work with ipython and pycharm. QUESTION: How to work around this known error, using ipython from within pycharm? Set up: OSX...
Reblochon Masque
1

votes
0

answer
12

Views

How do I update TextControl value with user input

I have a Python form with textcontrols, which need to save to a SQL table when the user hits Save. The only fields saving are the ones where I use SetValue() (author_field and sate_field) and have a default value. If the user changes these fields how can I save this to SQL? Do I need an on change ev...
Joshua J Geoghegan
1

votes
1

answer
210

Views

Animated gif with wxpython phoenix

I was trying to put an animated gif in a wxpython panel but apparently there is no animarion nor adv package in my wxpython version: In [1]: import wx In [2]: wx.version() Out[2]: '4.0.1 gtk3 (phoenix)' Then i tried to use the gif as a wx.Bitmap but of course it would not play. I know that according...
Luca
1

votes
1

answer
39

Views

Looking for function to shorten the list

Some widgets in wxPython has a method like 'GetSelections()' which returns a list of indexes of selected items. Having this list of index I can get a list of items. This way, for example: >>> list_of_items = ['zero', 'one', 'two', 'three', 'four', 'five'] >>> list_of_indexes = [1,3,5] >>> [list_of_i...
DamirX
1

votes
1

answer
63

Views

How to find an intersphinx mapping for wx.CheckBoxState

for my project documentation I use the intersphinx mapping to the wxpython documentation. That works fine so far but I don't succeed to get a link to wx.CheckBoxState. I tried to find information about that here and in other forums, but didn't find anything. Here my code: def my_meth( self, value,...
Humbalan
1

votes
1

answer
268

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 the button. The button takes up the whole frame. Here is my code: import wx app = wx.App() panel = wx....
Black Thunder
1

votes
1

answer
59

Views

Aligning objects to bottom of sizers in wxPython

I've been trying to add a button to the bottom of a sizer for a while and cant seem to get it to work right. Ive provided the code from my design along with a badly designed ascii layout. I want the back button to be in the bottom left corner of my frame. --------------------------------- |...
Neil Arakkal
1

votes
1

answer
0

Views

How to I disable the text ctrl when I select the combo box to a particular value?

I want to achieve the effect that when I select the ComboBox to anonymous, the TextCtrl grays out. I want the TextCtrl object be local to the method set_name, I don't want tc be a member of the entire class. That is, how can I achieve this without change tc as self.tc? If it is possible, I also don'...
buzhidao
1

votes
0

answer
25

Views

wxPython listctrl insertitem and SetItem all at once

I have a listctrl, self.list = wx.ListCtrl(panel, -1, style=wx.LC_REPORT | wx.LC_NO_HEADER) self.list.InsertColumn(col=0, heading='', format=wx.LIST_FORMAT_CENTER, width=150) self.list.InsertColumn(col=1, heading='', format=wx.LIST_FORMAT_CENTER, width=450) for person in people: #this is the issue r...
Kevin S
1

votes
1

answer
35

Views

Must I creat a class attributes to get the input of TextCtrl, can it be local?

Here is the original code, where I created a wx.TextCtrl attributes self.tc1, the binding event works fine: import wx class Example(wx.Frame): def __init__(self, title): super().__init__(None, title=title) self.panel = wx.Panel(self) self.tc1 = None self.initUI() def initUI(self): sizer = wx.GridBag...
buzhidao
0

votes
0

answer
9

Views

wxPython Phoenix button alignment

I am trying to lay out a wxPython frame with multiple sizers, the 2nd one has buttons that should be aligned to the right. In the code snippet below the alignment is to the left, even though I am specifying wx.BOTTOM | wx.RIGHT when I add the button control to the sizer. What am I doing wrong plea...
Paul Morriss
1

votes
0

answer
9

Views

wxPython - What does the Joystick class do?

I'm new to wxPython and have been examining all the classes included. While I was doing so, I ran into a class called 'wx.Joystick'. I copied a code from here to get the gist of the joystick class. What I got baffled me. Every thing was 'Fail', 'No', and '0'. Is this normal? If not what is the corre...
Xilpex
1

votes
2

answer
80

Views

EVT_CHAR never calls handler

I am continuing to have immense trouble receiving EVT_CHAR events on my custom control. After searching the internet for days, I am at a loss as to why I am not getting the events. I understand that questions pertaining to EVT_CHAR are plenty - I have read through quite a number of them, however non...
Shane
1

votes
1

answer
32

Views

wxpython display type list

I am reading some csv data files and trying to display the data. If I read them in by row I can display the data by line to a wx.TextCtrl . If I read the data in as a list : exampleFile = open('example.csv') exampleReader = csv.reader(exampleFile) exampleData = list(exampleReader) print (exampleData...
user3005949
4

votes
1

answer
1.9k

Views

Not able to install new wxpython

I am working on Debian Stable Linux and python 3.5 and I am trying to install the new wxpython (phoenix) using following command: pip3 install --upgrade wxpython However, it stops with following error: checking for CAIRO... yes checking for cairo_push_group... yes checking for GST... configure: WAR...
rnso
2

votes
0

answer
205

Views

OSError: exception: access violation in iewin.IEHtmlWindow

I was converting an application of mine from py2 to py3. The process includes migrating from wxPython Classic to Phoenix. It is a GUI application that uses the wxPython IEHtmlWindow class. When I execute the application I get this error: OSError: exception: access violation reading 0xFFFFFFFF903EED...
joaquin
2

votes
0

answer
53

Views

Which matplotlib methods may be called outside the GUI thread?

I've read that matplotlib is not generally thread safe. So let's assume proper synchronization. I've also come across the following statement in a matplotlib-users discussion: all GUI stuff must happen on the main thread (if you do threads), but for some backends draw_idle() maybe thread safe. (than...
Tavin Cole