similar to: RGtk2 / gWidgets - addHandlerClicked Problem

Displaying 20 results from an estimated 1000 matches similar to: "RGtk2 / gWidgets - addHandlerClicked Problem"

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,
2009 Dec 22
1
RGtk2 - retrieve ggraphics mouse coordinates during drag-and-drop event
Hi all, I have a gtable and a ggraphic widget. I want to drag an element from the table onto the graphic. When the drag object is released over the ggraphic widget, I want the mouse coordinates inside the ggraphic to be returned. Right now I do not know how to get the mouse ccordinates of the ggraphic widget at any given time. How can I access the ggraphics mouse coordinates? Below you find
2008 Dec 12
1
How to mimic select.list using RGtk2/gWidgetsRGtk2?
I want to write a function mimic the function of select.list(), here is my preliminary version. select <- function(x,multiple=TRUE,...){ ans<-new.env() g <- gwindow(title=title,wid=200,heigh=500) x1<-ggroup(FALSE,con=g) x2<-gtable(x,multiple=multiple,con=x1,expand=TRUE) gbutton("OK",con=x1,handler=function(h,...){ value <- svalue(x2) if (length(value)==0)
2007 Aug 22
2
gWidgets (tcltk): problem extracting values from widgets in glayout grid
Hello, I haven't been able to find an example for the second case below -- or perhaps I didn't recognize it when I saw it. Is there a value for x such that svalue(x) will return "bbb", either by itself or as part of an array? Or do I need to do something else entirely? (R2.5.1; Windows XP) > #### gWidgets test > options("guiToolkit"="tcltk") >
2008 Feb 12
1
gWidgets process management
Hello, I'm trying to make a graphical interface for an R function I've written. A common use for the function is to call it with specific parameters, and then watch the output as it evolves. There's not necessarily a logical stopping point, so I usually use ctrl-C when I'm done to stop it. I've made a gWidgets interface to the function that gets some user info and then on a
2006 Oct 06
2
[R-pkg] New packages pmg, gWidgets, gWidgetsRGtk2
I'd like to announce three new packages on CRAN: pmg, gWidgets, and gWidgetsRGtk2. --John Verzani 1 PMG *=*=*= The pmg package for R provides a relatively simple graphical user interface for R in a manner similar to the more mature RCmdr package. Basically this means a menu-driven interface to dialogs that collect arguments for R functions. This GUI was written with an eye towards
2006 Oct 06
2
[R-pkg] New packages pmg, gWidgets, gWidgetsRGtk2
I'd like to announce three new packages on CRAN: pmg, gWidgets, and gWidgetsRGtk2. --John Verzani 1 PMG *=*=*= The pmg package for R provides a relatively simple graphical user interface for R in a manner similar to the more mature RCmdr package. Basically this means a menu-driven interface to dialogs that collect arguments for R functions. This GUI was written with an eye towards
2011 Dec 18
1
gWidgets: how to remove that is box drawn when moving the mouse with pressed button
Hi, how can I omit the box drawn from the starting position to the current position of the mouse when clicking and it over a GTK graphics object? I have seen that in the 'playwith' package the box changes to an arrow when using the 'pan' button. But I do not find the corresponding line in the code to implement that. library(gWidgets)
2012 Nov 30
1
How to add widgets of gWidgets to widgets of rgtk2 ???
I have a layout in gwidgets. To this, I wanted to add a Textbox(gtkEntry) created from rgtk2... The code is as follows: MainLayOut <- glayout(homogeneous = FALSE, spacing = 10, container = SubGroup) MainLayOut[1, 1, anchor=left] <- "Number of Total Patients: " font(MainLayOut[1, 1, anchor=left]) <- c(weight="bold") patients <- gtkEntry()
2009 Jun 25
1
How do I define the method for gcheckboxgroup in gWidgets?
Hi All... I?m trying to build a small demo using gWidgets which permits interactive scaling and selection among different things to plot. I can get the widgets for scaling to work just fine. I am using gcheckboxgroup to make the (possibly multiple) selections. However, I can?t seem to figure out how to properly define the gcheckboxgroup; I can draw the widget properly, I think my handler would
2013 Feb 14
0
Building a Package & using gWidgets
Hi, For the past few months I've been building a simulation in R I hope to package. It consists of two usable functions, and many internal ones which one of the two usable functions call while looping, to perform the stages of simulation. A simple conceptual example is: # Abstract representation 1st Usable function, generates object containing settings for simulation. settings <-
2012 Mar 08
3
"figure margins too large" in RGtk2 drawing area as cairo device - why?
When using a gtkDrawingArea as a Cairo device I very often encounter the error: "figure margins too large" Even for the below "getting started" example from http://www.ggobi.org/rgtk2/ this is the case. > win = gtkWindow() > da = gtkDrawingArea() > win$add(da) > asCairoDevice(da) [1] TRUE > plot(1:10) Fehler in plot.new() : Grafikr?nder zu gro? > Also
2012 Mar 05
2
changing the drawing context using Cairo and RGtk2
I am not too familiar with Cairo and RGtk2 and have the following problem: I have a container with two GTK drawing areas converted into Cairo devices. I know that I can set the current drawing context e.g. using dev.set(). But this is tedious. How can I set the context using the objects da1 or da2? w <- gtkWindow() w$setSizeRequest(400, 400) vbox <- gtkVBox() da1 <- gtkDrawingArea()
2011 Dec 22
1
RGtk2: How to overlay a gtkDrawingArea with a button or any other widget?
I try to overlay a plot inside a gtkDrawingArea with a button (or any other widget). I tried to put both into a gtkFixed container. But this does not work, no printing occurs. Does someone know a solution? What I tried: w <- gtkWindow() w$setSizeRequest(400,400) fx <- gtkFixed() da <- gtkDrawingArea() fx$put(da, 100, 100) asCairoDevice(da) par(mar=c(0,0,0,0)) plot(1:10) btn.1
2013 Apr 23
1
Automation of R input
Hi all, I have R script which during its run require an input like this: choose between one of the grouping factor available : c("Village", "Country") can I automate this part, in other word to pass for example Village when I am running the script. One more thing the script is the TimeSeriesAnalysis {ndvits}. Thanks in advance for any help or suggestion. Regards, Vahe
2009 Dec 02
2
Reordering the results from table(cut()) by break argument
I have a vector and need to count how many data points fall inside each bin: dat <- rnorm(100) breaks <- -3:3 table((cut(dat, breaks))) (-3,-2] (-2,-1] (-1,0] (0,1] (1,2] (2,3] 3 13 42 30 12 0 if I reverse the breaks vector, the results remains the same: breaks <- rev(breaks) table((cut(dat, breaks))) (-3,-2] (-2,-1] (-1,0] (0,1] (1,2]
2010 Jan 01
2
changing a list element's name during execution in lapply - possible?
Happy New Year, all! I want to do calculations on each element of a list l, but i want the returned list element to be named differently after the calculation. Is it possible to do the renaming somehow within the lapply call? l <- list(a=NA, b=NA) lapply(l, function(x) {names(x) <- "new name"; return(x) }) This does not work, any ideas? TIA
2010 Feb 14
3
evaluate variable within expression - how?
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100214/4b41a017/attachment.pl>
2009 Nov 28
1
how to put ggobi display into a GUI window setup by gWidgets
Hi, I want to put a ggobi display into a GUI window setup by gWidgets, but error occur said it is not a S4 object. Does anyone have any idea about how to put it in or maybe it can not be put into a widget at all? Thanks A LOT! -- View this message in context: http://n4.nabble.com/how-to-put-ggobi-display-into-a-GUI-window-setup-by-gWidgets-tp930529p930529.html Sent from the R help mailing list
2010 Jan 08
1
how to flatten a list to the same level?
I have a nested list l like: l <- list(A=c(1,2,3), B=c("a", "b")) l <- list(l,l, list(l,l)) I want the list to be unlisted, but not on the lowest level of each "branch". I want the lowest level of each list branch to remain as it is. So unlist or unlist(rec=F) do not work here as the level of nesting may differ on the elements. The result should look like: