diff options
author | Guido van Rossum <guido@python.org> | 1990-10-31 11:16:43 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1990-10-31 11:16:43 (GMT) |
commit | fc9af02697b248f4f6f8c9b1c64af34e8eda9551 (patch) | |
tree | 87268c283630e2c4c1ca448abb985c21215c80cb /Lib | |
parent | 5b10f454f732c79a7e273131c02b5dc32e2b4337 (diff) | |
download | cpython-fc9af02697b248f4f6f8c9b1c64af34e8eda9551.zip cpython-fc9af02697b248f4f6f8c9b1c64af34e8eda9551.tar.gz cpython-fc9af02697b248f4f6f8c9b1c64af34e8eda9551.tar.bz2 |
Separated out resizing functionality.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/lib-stdwin/Buttons.py | 12 | ||||
-rwxr-xr-x | Lib/stdwin/Buttons.py | 12 |
2 files changed, 10 insertions, 14 deletions
diff --git a/Lib/lib-stdwin/Buttons.py b/Lib/lib-stdwin/Buttons.py index 739d7bb..5395f88 100644 --- a/Lib/lib-stdwin/Buttons.py +++ b/Lib/lib-stdwin/Buttons.py @@ -1,6 +1,9 @@ # Module 'Buttons' +from Resize import * + + # Import module 'rect' renamed as '_rect' # import rect @@ -92,12 +95,6 @@ class LabelAppearance(): v = (top + bottom - d.lineheight()) / 2 self.textpos = h, v # - # Resize method. - # Override for widgets that take over window geomtry management. - # - def resize(self): - pass - # # Generic drawing mechanism. # Do not override redraw() or draw() methods; override drawit() c.s. # @@ -360,11 +357,12 @@ class RadioReactivity() = TriggerReactivity(): # Auxiliary class for 'define' method. # -class Define(): +class Define() = NoResize(): # def define(self, (win, bounds, text)): self.init_appearance(win, bounds) self.init_reactivity() + self.init_resize() self.settext(text) return self diff --git a/Lib/stdwin/Buttons.py b/Lib/stdwin/Buttons.py index 739d7bb..5395f88 100755 --- a/Lib/stdwin/Buttons.py +++ b/Lib/stdwin/Buttons.py @@ -1,6 +1,9 @@ # Module 'Buttons' +from Resize import * + + # Import module 'rect' renamed as '_rect' # import rect @@ -92,12 +95,6 @@ class LabelAppearance(): v = (top + bottom - d.lineheight()) / 2 self.textpos = h, v # - # Resize method. - # Override for widgets that take over window geomtry management. - # - def resize(self): - pass - # # Generic drawing mechanism. # Do not override redraw() or draw() methods; override drawit() c.s. # @@ -360,11 +357,12 @@ class RadioReactivity() = TriggerReactivity(): # Auxiliary class for 'define' method. # -class Define(): +class Define() = NoResize(): # def define(self, (win, bounds, text)): self.init_appearance(win, bounds) self.init_reactivity() + self.init_resize() self.settext(text) return self |