Search found 6 matches

by MrSurly
Sun Feb 21, 2021 1:21 am
Forum: General Development
Topic: Using StaticText with style = ST_ELLIPSIZE_MIDDLE doesn't seem to work
Replies: 0
Views: 8049

Using StaticText with style = ST_ELLIPSIZE_MIDDLE doesn't seem to work

I have a StaticText box that may be very long (it's a full file path) inside a FlexGridSizer. When using SetSizer on the window, the FGS simply expands past the edge of the windows and is cut off. The text is never ellipsized. When using SetSizerAndFit, the window resizes to accommodate the long tex...
by MrSurly
Sun Dec 06, 2020 8:26 pm
Forum: General Development
Topic: Validated number input text control that works?
Replies: 4
Views: 3749

Re: Validated number input text control that works?

I can try this. The only wrinkle is that the arrows are kinda weird given the number ranges are in the tens of thousands, and inc/dec by 1 (or any value really) doesn't make sense for the datatype.
by MrSurly
Sun Dec 06, 2020 1:45 am
Forum: General Development
Topic: Validated number input text control that works?
Replies: 4
Views: 3749

Validated number input text control that works?

I have a simple app where numbers need to be provided by the user. Started with TextCtrl, and of course it allows any text. So I started looking to using a wx.Validator, but the OnChar only seems to work in Dialogs. So I went looking for something already created -- surely other people need to make ...
by MrSurly
Thu Nov 26, 2020 9:08 pm
Forum: General Development
Topic: Window sizing using "Fit" only works for default font size
Replies: 3
Views: 5715

Re: Window sizing using "Fit" only works for default font size

Python 3.8.3 (default, May 19 2020, 18:47:26)
wxPython 4.1.0

I'm on Ubuntu 20.04, using Anaconda.
by MrSurly
Thu Nov 26, 2020 7:09 pm
Forum: General Development
Topic: Window sizing using "Fit" only works for default font size
Replies: 3
Views: 5715

Window sizing using "Fit" only works for default font size

The code below is working for me, with one small hiccup. Using col1sizer.Fit() in __init__ works as expected. Without this, the window is the wrong size. With this call, the window exactly fits the contents. But then I wanted to change the font size, so I added the self.SetFont() call, which also wo...