search for: addhandlerclicked

Displaying 3 results from an estimated 3 matches for "addhandlerclicked".

2009 Dec 27
2
RGtk2 / gWidgets - addHandlerClicked Problem
...able handler is executed twice when the button is pressed (from the 2nd pressing on). I want it to be executed only once. Does someone know, why this happens and how I can change it? library(gWidgets) w <- gwindow() b <- gbutton("press", cont=w) tbl <- gtable(1:10, cont=w) addhandlerclicked(b, handler=function(h, ...){ cat("addhandlerclicked button\n") svalue(tbl, index=T) <- 1 # change the table value }) addhandlerclicked(tbl, handler=function(h, ...){ cat("addhandlerclicked table\n") }) Thanks! Mark ??????????????????????????????????????? Mark Heckmann...
2009 Dec 27
1
gWidgets / RGtk2 - how to change a handler from a toolbar?
I want to assign a default handler to a toolbar button and change the handler later. The addhandlerclicked() method does not apply to a gAction Object, I think... defHandler <- function(h, ...) print("default") w <- gwindow() aTest <- gaction(label="Test", icon="open", handler=defHandler) tblList = list( test = aTest ) toolBar = gtoolbar(tblList, cont=w) A...
2009 Dec 22
1
RGtk2 - retrieve ggraphics mouse coordinates during drag-and-drop event
...usr" pltToUsr = function(x,y) { plt = par("plt"); usr = par("usr") c( (usr[2]-usr[1])/(plt[2]-plt[1])*(x - plt[1]) + usr[1], (usr[4] - usr[3])/(plt[4] - plt[3])*(y - plt[3]) + usr[3]) } addHandlerFocus(g, handler = function(h,...) { print(c("focus g")) }) addHandlerClicked(g, handler = function(h,...) { x <- h$x; y <- h$y xStart <<- x; yStart <<- y pressed <<- TRUE print(c("pressed at:", c(x,y))) }) da <- g at widget@widget callbackID <- gSignalConnect(da,"button-release-event", function (w,e,...) { al...