簡體   English   中英

tk_messageBox 在網格視圖中顯示錯誤,但在包中沒問題

[英]tk_messageBox is showing erroneous display in grid view, but ok in pack

我正在嘗試在 TCL/TK 中顯示一個消息框,預計它會被關閉以在父窗口中執行任何操作。 當我執行下面的代碼時,即使清除了消息框,文本框也會進入“禁用”狀態。

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"

如果我引入 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"

有人可以幫我確定這里有什么問題嗎?

在 Windows 上重新創建。 這似乎是一個錯誤,我已經為它打開了一張票。

你可以做:

 toplevel .top1
 wm withdraw .top1

隱藏 .top1 窗口。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM