[R-gui] tktable or similar - highlight selected cells using color background

Peter Dalgaard p.dalgaard at biostat.ku.dk
Fri May 1 23:23:18 CEST 2009


David Katz wrote:
> I'm trying to use tktable or tablelist to display a data frame and
> highlighting certain cells using the background color.
> 
> I found this in the archives, but cannot translate it to use tcl as
> suggested by the error msg:
> 
> require(tcltk)
> tclRequire("Tktable")
> tt <- tktoplevel()
> table1 <- tkwidget(tt,"table")
> tkpack(table1)
> tkcmd(.Tk.ID(table1),"tag","celltag","ZeroZero","0,0")
> tkcmd(.Tk.ID(table1),"tag","celltag","ZeroOne","0,1")
> tkcmd(.Tk.ID(table1),"tag","configure","ZeroZero",bg="red")
> tkcmd(.Tk.ID(table1),"tag","configure","ZeroOne",bg="blue")
> 
> Error: 'tkcmd' is defunct.
> Use 'tcl' instead.
> See help("Defunct")
> 

I think it's just

tcl(table1, "tag", "celltag", "ZeroZero", "0,0")
etc.


-- 
    O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



More information about the R-SIG-GUI mailing list