如何在R中的gWidget更新gtable?

时间:2014-06-22 12:04:55

标签: r gwidgets gtable

我正在努力更新以下GUI代码中的表数据。它可以将每个新请求添加到上一个,这样它就不适合屏幕,而我需要用新的请求替换旧请求。谢谢!甲

require ( gWidgets )
options ( guiToolkit="RGtk2" )
window <- gwindow ( "Pilot>>" , visible = FALSE, horizontal = FALSE )
paned <- gpanedgroup ( cont = window )
group <- ggroup ( cont = paned, horizontal = FALSE  )
glabel ( "FPC:" , cont = group )
entry <- gedit ( "" , cont = group )
entry [ ] <- actfpc$CURFPC ##list of codes for auto-filling
search_button <- gbutton ( "Go!" , cont = group )
addSpring ( group )
frame <- gframe ( "Supply:" , cont = paned , horizontal = FALSE,use.scrollwindow=TRUE )
addHandlerChanged ( search_button , handler = function ( h , ... ) {
    ##Data subset for entered value
    a<-skulist[skulist$FPC==svalue(entry),]
    a<-a[c("X_id","FPC","STATUS","COMMENT","DCTR","DCSTOCK")]
    tbl <- gtable ( a , cont = frame, expand=TRUE )
        } )
size ( frame) <- c ( 950 , 250)
visible ( window ) <- TRUE

0 个答案:

没有答案