[R-gui] ttkentry background doesnt work

Thomas Tschager thomastschager at dnet.it
Thu Aug 26 16:33:28 CEST 2010


Thanks for your advices!
Thomas Tschager

On Tue, Aug 24, 2010 at 1:30 PM, Peter Dalgaard <pdalgd at gmail.com> wrote:
> On 08/24/2010 04:59 PM, jverzani wrote:
>
> 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)
>
> The whole thing indicates some rather glaring gaps in the interface.
> Pasting large stretches of Tcl code together like that _should_ be
> unnecessary, but for now, that's probably what you have to do.

You can do this which does not use paste:

w <- tktoplevel()
.Tcl("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)



----------------------------------------------------
This mail has been sent using Alpikom webmail system
http://www.alpikom.it



More information about the R-SIG-GUI mailing list