I am trying to clear the content of a text box which i created using
Window_1$env$txt1 <- tk2text(Window_1, width = 90, height = 1)
I can update the values using
tkinsert(Window_1$env$txt1 "end", "test")
But can someone help me how to clear the contents of Window_1$env$txt1
Cheers :)
I found the answer :) to delete the text box I have to use 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")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.