Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/258.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 如何使用'alt+;字母“钥匙扣”?_R_Button_Handler_Gwidgets - Fatal编程技术网

R 如何使用'alt+;字母“钥匙扣”?

R 如何使用'alt+;字母“钥匙扣”?,r,button,handler,gwidgets,R,Button,Handler,Gwidgets,在各种程序中,您通常可以使用alt+c键绑定来激活按钮,例如,如果有问题的按钮是Close。如何在gWidgets2中执行此操作?举个例子: w <- gwindow("Buttons") g <- ggroup(cont=w, horizontal=FALSE) ## various buttons ## without icon b2 <- gbutton("ouvrir", cont=g) ## with a handler b4 <- gbutton("cl

在各种程序中,您通常可以使用alt+c键绑定来激活按钮,例如,如果有问题的按钮是
Close
。如何在
gWidgets2
中执行此操作?举个例子:

w <- gwindow("Buttons")
g <- ggroup(cont=w, horizontal=FALSE)

## various buttons

## without icon
b2 <- gbutton("ouvrir", cont=g)

## with a handler
b4 <- gbutton("click me", cont=g, handler=function(h,...) {
    if(svalue(b2) == "open")
        svalue(b2) <- "ouvrir"
    else
        svalue(b2) <- "open"
})
w相关: