Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试清除我使用创建的文本框的内容
Window_1$env$txt1 <- tk2text(Window_1, width = 90, height = 1)
我可以使用更新值
tkinsert(Window_1$env$txt1 "end", "test")
但是有人可以帮我清除 Window_1$env$txt1 的内容吗
干杯:)
我找到了答案:) 要删除我必须使用 tkdelete 的文本框
tktag.add(Window_1$env$txt1, "sel", "0.0", "end") #tagging the selecting tkdelete(Window_1$env$txt1, "sel.first", "sel.last") tkinsert(Window_1$env$txt1, "end", "new_text")