I have a wxPanel. How can I make it resizable by the user? With a drag-and-drop resize bar?
I wonder what the widgets I need are.
Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
wx.SplitterWindowto make panels in a frame to be resizable (that is to divide a frame in, for example, two resizable sub-windows).If what you want is to be able to resize a panel on a grid of other panels then you can use
wx.lib.resizewidget. This provides of a drag-and-drop like bar but you can not move the position of the widget only resize it.You have examples of both in the wxpython docs and demos package
Here you have an example using a SplitterWindow (the code is very verbose because was autogenerated with wxglade. It can be simplified if you want to):