x <- gconfirm("Run Program?",title="gConfirm")
if (x){
w <- gwindow(title="List of Programs",visible=TRUE)
g = ggroup(horizontal = FALSE, cont=w)
glabel("Please select the Program", cont=g)
ptype <- c("A","B")
temp <- gcombobox(ptype , cont=g)
addHandlerChanged(temp , handler=function(...){})
gbutton("Run", cont=g,handler = function(...){
print(svalue(temp)
dispose(g)
runagain <- gconfirm("Run again?",title="gConfirm")
if(runagain){
## If user clicks okay, I want to start running again from the third line of the code, w <- gwindow......)**
}
}
任何人都可以暗示解决这个问题吗?另外,如何在类似的UI框中显示svalue(temp)而不是在控制台上打印它。非常感谢任何帮助。
答案 0 :(得分:1)
这样的东西可能会让你得到你想要的东西:
9123456789
8987123456
9987654321