Browse Source

Init the control layout before the init to avoid runtime errors

pull/96/head
Eugenio Parodi 3 years ago
parent
commit
38214f7bee
  1. 3
      TermTk/TTkWidgets/window.py

3
TermTk/TTkWidgets/window.py

@ -46,6 +46,7 @@ class TTkWindow(TTkResizableFrame):
'_flags', '_winTopLayout',
'_maxBk', '_redBk' )
def __init__(self, *args, **kwargs):
self._winTopLayout = TTkGridLayout()
super().__init__(*args, **kwargs)
self._title = kwargs.get('title' , '' )
self._flags = TTkK.NONE
@ -56,7 +57,7 @@ class TTkWindow(TTkResizableFrame):
self._menubarTopPosition = 2
# Add the top Layout to keep the windows action buttons
self._winTopLayout = TTkGridLayout()
# self._winTopLayout = TTkGridLayout()
self.rootLayout().addItem(self._winTopLayout)
# Close Button
self._btnClose = TTkButton(border=False, text="x", size=(3,1), maxWidth=3, minWidth=3, visible=False)

Loading…
Cancel
Save