Re: [wxPython-users] Problem with Automatic Resizing of TextCtrl

15 views
Skip to first unread message

Dev Player

unread,
May 21, 2015, 5:50:44 PM5/21/15
to wxpython-users
The is a common issue. You have a parent-child relation mismatch. You add the textctrl to the sizer of the frame. The frame is not the parent of the textctrl. The panel is the parent of the textctrl. You need to add a sizer to the panel and add the textctrl to that sizer (of the panel, not the frame). Although not necessary in this example, I typically add a sizer to the frame and add the panel to that sizer. So there would be two sizers, one for the panel, and one for the frame.



On Mon, May 4, 2015 at 10:17 PM, <fange...@gmail.com> wrote:
I'm trying to write a simple text editor, and I'm having the following problem: when the program is resized, the TextCtrl doesn't resize with the main window. How can I solve this? The attached file is what I have so far. Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

try_this.py
Reply all
Reply to author
Forward
0 new messages