Get method for Spin

This commit is contained in:
MikeTheWatchGuy 2018-12-09 13:39:27 -05:00
parent a9b775c1b7
commit e6f8dd05b5
2 changed files with 5 additions and 2 deletions

View File

@ -962,6 +962,9 @@ class Spin(Element):
if self.ParentForm.CurrentlyRunningMainloop:
self.ParentForm.TKroot.quit() # kick the users out of the mainloop
def Get(self):
return self.TKStringVar.get()
def __del__(self):
try:
self.TKSpinBox.__del__()
@ -5226,13 +5229,11 @@ def StartupTK(my_flex_form):
# ow = _my_windows.NumOpenWindows
ow = Window.NumOpenWindows
print(ow)
# print('Starting TK open Windows = {}'.format(ow))
if not ow and not my_flex_form.ForceTopLevel:
# if first window being created, make a throwaway, hidden master root. This stops one user
# window from becoming the child of another user window. All windows are children of this
# hidden window
print("******")
Window.IncrementOpenCount()
Window.hidden_master_root = tk.Tk()
Window.hidden_master_root.attributes('-alpha', 0) # HIDE this window really really really

View File

@ -965,6 +965,8 @@ class Spin(Element):
self.QT_Spinner.setDisabled(False)
super().Update(self.QT_Spinner, background_color=background_color, text_color=text_color, font=font, visible=visible)
def Get(self):
return self.QT_Spinner.value()
def __del__(self):
super().__del__()