In wxPython, is there a short form of:
size = object.GetBestSize()
object.SetSize(size)
(For controls or for frames and dialogs.) .Layout() only adjusts the sizes of the child controls.
In SWT there’s .pack() for this.
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.
Unless you set the size of the widget explicitly, they generally already adjust to the right size. If you add widgets to a sizer and tell them to stretch, then that won’t be the case, of course. You can also use the sizer’s Fit() method to force it too, although I rarely think this is necessary.