1

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?

landroni
  • 2,902
  • 1
  • 32
  • 39
  • Related: http://stackoverflow.com/questions/24711308/how-to-bind-esc-key-to-close-a-gwindow-in-gwidgets – Thomas Jul 31 '14 at 08:58

0 Answers0