Added non-blocking form keyboard binding
If the form is a non-blocking form, when a key is pressed, the form will continuously return that key as being pressed until it is released.
This commit is contained in:
parent
1f9247e6ce
commit
aa2d31f24b
|
@ -1791,8 +1791,10 @@ def StartupTK(my_flex_form):
|
||||||
# root.bind('<Destroy>', MyFlexForm.DestroyedCallback())
|
# root.bind('<Destroy>', MyFlexForm.DestroyedCallback())
|
||||||
ConvertFlexToTK(my_flex_form)
|
ConvertFlexToTK(my_flex_form)
|
||||||
my_flex_form.SetIcon(my_flex_form.WindowIcon)
|
my_flex_form.SetIcon(my_flex_form.WindowIcon)
|
||||||
if my_flex_form.ReturnKeyboardEvents:
|
if my_flex_form.ReturnKeyboardEvents and not my_flex_form.NonBlocking:
|
||||||
root.bind("<KeyRelease>", my_flex_form.KeyboardCallback)
|
root.bind("<KeyRelease>", my_flex_form.KeyboardCallback)
|
||||||
|
elif my_flex_form.ReturnKeyboardEvents:
|
||||||
|
root.bind("<Key>", my_flex_form.KeyboardCallback)
|
||||||
|
|
||||||
if my_flex_form.AutoClose:
|
if my_flex_form.AutoClose:
|
||||||
duration = DEFAULT_AUTOCLOSE_TIME if my_flex_form.AutoCloseDuration is None else my_flex_form.AutoCloseDuration
|
duration = DEFAULT_AUTOCLOSE_TIME if my_flex_form.AutoCloseDuration is None else my_flex_form.AutoCloseDuration
|
||||||
|
|
Loading…
Reference in New Issue