-
How to change only hight of an object in wxPython, leaving its width automatic? In my case it’s a TextCtrl.
-
How to make the height of the window available for change and lock the width?
How to change only hight of an object in wxPython, leaving its width automatic?
Share
For the width or height to be automatically determined based on context you use for it the value of -1, for example
(-1, 100)for a height of 100 and automatic width.The default size for controls is usually
(-1, -1).If a width or height is specified and the sizer item for the control doesn’t have
wx.EXPANDflag set (note that even if this flag is set some sizers won’t expand in both directions by default) you might call it “locked” as it won’t chage that dimension.Make sure to study the workings of sizers in depth as it is one of the most important things in GUI design.