Re: [R] Need suggestions about GUI

2008-01-23 Thread j verzani
ronggui gmail.com> writes: > > There is a problem with font<- . > > g<-gtext(con=T) > > enter some text, and select a chunk of text. > > font(g) <- c("color"="red") > > Now I would like to change the color back into "black". But font(g) <- > c("color"="black") does not work. > > Thanks >

Re: [R] Need suggestions about GUI

2008-01-23 Thread Gabor Grothendieck
On Jan 22, 2008 7:41 AM, ronggui <[EMAIL PROTECTED]> wrote: > What I don't know how to do: > 1, When I select specific code, and click some button (for example > highligh), all the text chunk related to that code will be highlighted > (through color or font style etc.) > 2, I would like to arganize

Re: [R] Need suggestions about GUI

2008-01-23 Thread Felix Andrews
> 3, In the coding buttong, how can I avoid using <<- in handler function. coding <- gbutton(" Coding ",container=codepanel, action=environment(), handler=function(h, ...) { env <- h$action ## blah blah env$node[n_coding] <- svalue(addcode) }) but make su

Re: [R] Need suggestions about GUI

2008-01-23 Thread ronggui
Thanks. I played around yesterday and found out the way. ## gWidgetsRGtk2 ### translate the selected index back to pointer ### require(gWidgetsRGtk2) #a<-gtext(cont=T) #svalue(a)<-"abcde" #buffer [EMAIL PROTECTED]@widget$GetBuffer() # get the buffer require(RGtk2) win<-gtkWindow() win$add(g<-gtk

Re: [R] Need suggestions about GUI

2008-01-23 Thread Michael Lawrence
On Jan 22, 2008 6:41 AM, ronggui <[EMAIL PROTECTED]> wrote: > Thanks, John, > Here is some code to show what I want to do. BTW, it seems there is a > bug in svalue in gWidgetstcltk for gtext when using the drop=T > argument. > > getsel <- function(obj, toolkit, ...) { > ### get the selected text f

Re: [R] Need suggestions about GUI

2008-01-23 Thread ronggui
There is a problem with font<- . g<-gtext(con=T) enter some text, and select a chunk of text. font(g) <- c("color"="red") Now I would like to change the color back into "black". But font(g) <- c("color"="black") does not work. Thanks 2008/1/22, j verzani <[EMAIL PROTECTED]>: > ronggui gmail.

Re: [R] Need suggestions about GUI

2008-01-22 Thread ronggui
Thanks, John, Here is some code to show what I want to do. BTW, it seems there is a bug in svalue in gWidgetstcltk for gtext when using the drop=T argument. getsel <- function(obj, toolkit, ...) { ### get the selected text from gtext getWidget <- gWidgetstcltk:::getWidget if(tclvalue(tktag.ranges

Re: [R] Need suggestions about GUI

2008-01-21 Thread j verzani
ronggui gmail.com> writes: > Thanks. > > gWidgets is quite good. However, I want to get the selection text chunk as > well as the index, but the index arguments does not work for gtext. > > > obj<-gtext(cont=T) > > svalue(obj,drop=T) > [1] "cde" > > svalue(obj,drop=T,index=T) > [1] "cde" >

Re: [R] Need suggestions about GUI

2008-01-21 Thread ronggui
AM > *To:* R-Help > *Subject:* [R] Need suggestions about GUI > > > > What I want to do is: > 1, creat a text box, insert text into that box. > 2, select chunk of of the text by mouse, and link it to a lable. so I > would > like a way to get that chunk of text. > >

Re: [R] Need suggestions about GUI

2008-01-21 Thread Greg Snow
want to click a button after making the selection to capture the text? or some other way to indicate that you have made the selection? From: [EMAIL PROTECTED] on behalf of ronggui Sent: Mon 1/21/2008 2:02 AM To: R-Help Subject: [R] Need suggestions about GUI

Re: [R] Need suggestions about GUI

2008-01-21 Thread ronggui
Thanks. gWidgets is quite good. However, I want to get the selection text chunk as well as the index, but the index arguments does not work for gtext. > obj<-gtext(cont=T) > svalue(obj,drop=T) [1] "cde" > svalue(obj,drop=T,index=T) [1] "cde" 2008/1/21, Gabor Grothendieck <[EMAIL PROTECTED]>: >

Re: [R] Need suggestions about GUI

2008-01-21 Thread Gabor Grothendieck
You can find examples of using tcltk here: http://www.sciviews.org/_rgui/tcltk/ Also the gwidgets package is a toolkit independent layer that can run on top of tcltk or RGtk and it is described with many examples here: http://wiener.math.csi.cuny.edu/pmg/gWidgets On Jan 21, 2008 4:02 AM, ronggu

[R] Need suggestions about GUI

2008-01-21 Thread ronggui
What I want to do is: 1, creat a text box, insert text into that box. 2, select chunk of of the text by mouse, and link it to a lable. so I would like a way to get that chunk of text. Can I do such job with tcltk? Any relavant tutorial materials? Thanks -- HUANG Ronggui Bachelor of Social Wor