[英]tk_messageBox is showing erroneous display in grid view, but ok in pack
I am trying to display a message box in TCL/TK and it is expected to be closed to perform any operation in parent window.我正在尝试在 TCL/TK 中显示一个消息框,预计它会被关闭以在父窗口中执行任何操作。 When I execute the below code, the text box is going to the "disabled" state even after clearing the message box.
当我执行下面的代码时,即使清除了消息框,文本框也会进入“禁用”状态。
wm title . "Message Box Demo"
tk::text .t0
grid .t0 -column 0 -row 1 -columnspan 2
tk_messageBox -type okcancel -message "Press Ok to confirm" \
-title "Update V 3.6" -icon "info"
If I introduce TopLevel to include "parent' window in messageBox, it is opening a new window as top-level window and allowing to access the text box.如果我引入 TopLevel 在 messageBox 中包含“父”窗口,它会打开一个新窗口作为顶级窗口并允许访问文本框。
wm title . "Message Box Demo"
toplevel .top1
tk::text .t0
grid .t0 -column 0 -row 1 -columnspan 2
tk_messageBox -type okcancel -parent .top1 -message "Press Ok to confirm" \
-title "Update V 3.6" -icon "info"
can someone help me to identify what is wrong here?有人可以帮我确定这里有什么问题吗?
Recreated on windows.在 Windows 上重新创建。 This does appear to be a bug and I have opened a ticket for it.
这似乎是一个错误,我已经为它打开了一张票。
You can do:你可以做:
toplevel .top1
wm withdraw .top1
to hide the .top1 window.隐藏 .top1 窗口。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.