GeUserArea GetMinSize can't scale down
-
On 02/11/2017 at 11:07, xxxxxxxx wrote:
Hello, I'm facing to a weird problem where I can't scale down my GeUserArea but I can scale up.
Here is my code which is very basic
def Sized(self, w, h) : print "SIZED| w:{} - h:{}".format(w, h) self._w = w self._h = h self.LayoutChanged() def GetMinSize(self) : print "GETMINSIZE| w:{} - h:{}".format(self._w, self._h) return self._w, self._h
My final goal is to dynamicly limit the min width size but can still be dynamic.
Thanks in advance
-
On 02/11/2017 at 12:01, xxxxxxxx wrote:
Well, every time you size your userarea Sized is called, which sets self._w and self._h to the current size.
While your GetMinSize returns these exact values. So, you cannot go less than your current size, since that's what you return as the minimal size. As a result, you can only resize larger.Your GetMinSize should return the actual minimal values and not the self._w, self._h which have been set by the Sized function.
-
On 02/11/2017 at 13:08, xxxxxxxx wrote:
Hoooo ok pretty stupid from me. Thanks solved.