Get method for Spin
This commit is contained in:
parent
a9b775c1b7
commit
e6f8dd05b5
|
@ -962,6 +962,9 @@ class Spin(Element):
|
||||||
if self.ParentForm.CurrentlyRunningMainloop:
|
if self.ParentForm.CurrentlyRunningMainloop:
|
||||||
self.ParentForm.TKroot.quit() # kick the users out of the mainloop
|
self.ParentForm.TKroot.quit() # kick the users out of the mainloop
|
||||||
|
|
||||||
|
def Get(self):
|
||||||
|
return self.TKStringVar.get()
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
try:
|
try:
|
||||||
self.TKSpinBox.__del__()
|
self.TKSpinBox.__del__()
|
||||||
|
@ -5226,13 +5229,11 @@ def StartupTK(my_flex_form):
|
||||||
|
|
||||||
# ow = _my_windows.NumOpenWindows
|
# ow = _my_windows.NumOpenWindows
|
||||||
ow = Window.NumOpenWindows
|
ow = Window.NumOpenWindows
|
||||||
print(ow)
|
|
||||||
# print('Starting TK open Windows = {}'.format(ow))
|
# print('Starting TK open Windows = {}'.format(ow))
|
||||||
if not ow and not my_flex_form.ForceTopLevel:
|
if not ow and not my_flex_form.ForceTopLevel:
|
||||||
# if first window being created, make a throwaway, hidden master root. This stops one user
|
# 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
|
# window from becoming the child of another user window. All windows are children of this
|
||||||
# hidden window
|
# hidden window
|
||||||
print("******")
|
|
||||||
Window.IncrementOpenCount()
|
Window.IncrementOpenCount()
|
||||||
Window.hidden_master_root = tk.Tk()
|
Window.hidden_master_root = tk.Tk()
|
||||||
Window.hidden_master_root.attributes('-alpha', 0) # HIDE this window really really really
|
Window.hidden_master_root.attributes('-alpha', 0) # HIDE this window really really really
|
||||||
|
|
|
@ -965,6 +965,8 @@ class Spin(Element):
|
||||||
self.QT_Spinner.setDisabled(False)
|
self.QT_Spinner.setDisabled(False)
|
||||||
super().Update(self.QT_Spinner, background_color=background_color, text_color=text_color, font=font, visible=visible)
|
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):
|
def __del__(self):
|
||||||
super().__del__()
|
super().__del__()
|
||||||
|
|
Loading…
Reference in New Issue