daniel d:
Hello, I'm having issues with wx.StaticText alignment.
I suspect that at the time of the previous .Layout(), the StaticText's were blank and so were given a very small size. And they're right-aligned that also means they ended up positioned to the far right. So when you change the label text there's isn't room for the larger text.
Re-layouting the frame (or a panel of the frame) after SetLabelText should fix that. If you want to avoid a re-layout, because it might move other things around slightly as well, then perhaps you can give the StaticText's explicit sizes instead of having the size set by content.
BR, Anders
Layout() did the trick! Thanks!
···
On Thursday, August 2, 2018 at 4:03:22 AM UTC-5, Anders Munch wrote:
daniel d:
Hello, I’m having issues with wx.StaticText alignment.
I suspect that at the time of the previous .Layout(), the StaticText’s were blank and so were given a very small size. And they’re right-aligned that also means they ended up positioned to the far right. So when you change the label text there’s isn’t room for the larger text.
Re-layouting the frame (or a panel of the frame) after SetLabelText should fix that. If you want to avoid a re-layout, because it might move other things around slightly as well, then perhaps you can give the StaticText’s explicit sizes instead of having the size set by content.
BR, Anders