Thomas Tschager <thomastschager <at> dnet.it> writes: > > Hello, > > I'm trying to change the background color of a ttkentry-object. With > tkentry-objects it works fine: > > library(tcltk) > tt <- tktoplevel() > test1 <- tkentry(tt) > test2 <- ttkentry(tt) > tkgrid(test1,test2) > tkconfigure(test1, background="yellow") #working > tkconfigure(test2, background="yellow") #not working >
You can use styles. Here is an example: w <- tktoplevel() .Tcl(paste("ttk::style layout styled.entry {", " Entry.field -sticky nswe -border 0 -children {", " Entry.padding -sticky nswe -children {", " Entry.textarea -sticky nswe", " }", " }", "}", sep="\n")) tcl("ttk::style", "configure","styled.entry", background="#b2b2b2") e <- ttkentry(w, style="styled.entry") tkpack(e) > I used different styles and tried suggestions from other mailing lists > (http://coding.derkeiler.com/Archive/Tcl/comp.lang.tcl/2006-11/msg00528.html), > but nothing worked for me... (I'm using WinXP) > > Thanks, > Thomas Tschager > > ---------------------------------------------------- > This mail has been sent using Alpikom webmail system > http://www.alpikom.it > _______________________________________________ R-SIG-GUI mailing list R-SIG-GUI@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-gui