In various programs you can often activate a button using an alt+c key binding, if for example the button in question is Close
. How is it possible to do this in gWidgets2
? Take this example:
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"
})
How can I have the c
underlined in click me
, and the handler of the b4
button activated when the user activates alt+c?