I am trying to make a simple window with one panel containing a textctrl. I had this working with absolute size for the panel/textctrl but now I am trying to make it work with a box sizer.
The problem is the textctrl is now too short and I can’t see the text when my program starts. If I specify the size for the text control eg size=(300,50) the text control will get a bit longer but not long enough (it will only go to certain length no matter what I put in size).
It is probably a really obvious error but I can’t seem to find it. I’ve included the section with the bug in bug.py and the rest of my code in case it’s needed in gui_test.py. Also I’m pretty new at programming so any comments on style/anything helpful are welcome
You are putting the textctrl on the panel, but adding it to a sizer that is assigned to the frame. Instead assign this sizer to the panel, and if you want you can create another sizer with the panel in it and assign that sizer to the frame.
I am trying to make a simple window with one panel containing a
textctrl. I had this working with absolute size for the panel/textctrl
but now I am trying to make it work with a box sizer.
The problem is the textctrl is now too short and I can't see the text
when my program starts. If I specify the size for the text control eg
size=(300,50) the text control will get a bit longer but not long enough
(it will only go to certain length no matter what I put in size).
It is probably a really obvious error but I can't seem to find it. I've
included the section with the bug in bug.py and the rest of my code in
case it's needed in gui_test.py. Also I'm pretty new at programming so
any comments on style/anything helpful are welcome