[R] Read/Write textbox in R

Ritz gulabrani.ritika at gmail.com
Tue Nov 1 08:37:32 CET 2011


I am writing a GUI for my R script. It is a very basic form consisting of
textboxes and buttons. 
I tried to run the following example to learn how to read value currently
entered into the textbox:
( it requires tcltk/tcltk2 packages )
    # Create the widgets
    base <- tktoplevel()
    list <- tklistbox(base, width = 20, height = 5)

    entry <- tkentry(base)
    text <- tktext(base, width = 20, height = 5)
    tkpack(list, entry, text)
    # Write and read from the widgets
    writeList(list, c("Option1", "Option2", "Option3"))
    writeList(entry, "An Entry box")
    writeText(text, "A text box")
    # Will be NULL if not selected
    getListValue(list)
    getTextValue(text)
    getEntryValue(entry)
# Destroy toplevel widget
#    tkdestroy(base)
## End(Not run)

I took it from:
http://svitsrv25.epfl.ch/R-doc/library/widgetTools/html/writeText.html.
When I run the example I get the following error:
"Error in function ()  : could not find function "getTextValue"

What's missing here? Is the function getTextValue() inactive/not supported
anymore? Any alternatives?

Thanks!

Regards,
Ritika


--
View this message in context: http://r.789695.n4.nabble.com/Read-Write-textbox-in-R-tp3962727p3962727.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list