From: Keith on
From the ttk Wiki:
ttk::combobox .cb -style mycombobox.TCombobox
ttk::style configure mycombobox.TCombobox -fieldbackground bisque

so I modifiedmy script to do this but received an error

ttk::style configure combox.T -fieldbackground $ccolor
[..]
ttk::combobox $gz.e.p$e -textvariable mcp(stp,$f) \
-values $qpl(step) -width 8 -state readonly -style combox.T


Layout combox.T not found
while executing
"ttk::combobox $gz.e.p$e -textvariable mcp(stp,$f) -values $qpl(step) -
width 8 -state readonly -style combox.T"


BTW are there any *good* books on TCL/Tk that include ttk/tile in them so
I can read, wear out and mark it up like my PP in Tcl & Tk Book? TIA.

Keith

From: Zbigniew Diaczyszyn on
Am 30.04.2010 15:14, schrieb Keith:

> ttk::style configure combox.T -fieldbackground $ccolor

try:

ttk::style configure combox.Tcombobox -fieldbackground $ccolor

> [..]
> ttk::combobox $gz.e.p$e -textvariable mcp(stp,$f) \
> -values $qpl(step) -width 8 -state readonly -style combox.T

ttk::combobox $gz.e.p$e -textvariable mcp(stp,$f) \
-values $qpl(step) -width 8 -state readonly -style combox.Tcombobox

Zbigniew Diaczyszyn
From: Keith on
On Fri, 30 Apr 2010 18:51:46 +0200, Zbigniew Diaczyszyn wrote:

> Am 30.04.2010 15:14, schrieb Keith:
>
>> ttk::style configure combox.T -fieldbackground $ccolor
>
> try:
>
> ttk::style configure combox.Tcombobox -fieldbackground $ccolor
>
>> [..]
>> ttk::combobox $gz.e.p$e -textvariable mcp(stp,$f) \ -values $qpl(step)
>> -width 8 -state readonly -style combox.T
>
> ttk::combobox $gz.e.p$e -textvariable mcp(stp,$f) \
> -values $qpl(step) -width 8 -state readonly -style combox.Tcombobox
>
> Zbigniew Diaczyszyn

Hi, I made the changes and still received the error:

Layout combox.Tcombobox not found
while executing
"ttk::combobox $gz.e.p$e -textvariable mcp(stp,$f) -values $qpl(step) -
width 8 -state readonly -style combox.Tcombobox"

Am I missing setting up something else first before using -style?
From: Zbigniew Diaczyszyn on
Am 30.04.2010 21:05, schrieb Keith:

> Hi, I made the changes and still received the error:
>
> Layout combox.Tcombobox not found
> while executing
> "ttk::combobox $gz.e.p$e -textvariable mcp(stp,$f) -values $qpl(step) -
> width 8 -state readonly -style combox.Tcombobox"

Sorry, I make this typo often ...

Not: combox.Tcombobox

but: combox.TCombobox

The following example is working with Tkcon:

pack [ttk::combobox .cb]
ttk::style configure mycb.TCombobox -fieldbackground yellow
..cb configure -style mycb.Tcombobox

For testing and debugging:

ttk::style layout mycb.TCombobox
->
Combobox.field -sticky nswe -children {Combobox.downarrow -side right
-sticky ns Combobox.padding -expand 1 -sticky nswe -children
{Combobox.textarea -sticky nswe}}

and to check the possible element options of this layout:

ttk::style element options Combobox.field
->
-fieldbackground -borderwidth

ttk::style element options Combobox.textarea
->
-font -width

ttk::style element options Combobox.downarrow
->
-background -relief -borderwidth -arrowcolor -arrowsize

I hope this will work now

Zbigniew Diaczyszyn