On 13 abr, 16:54, Emiliano <
emilianogavi...@gmail.com> wrote:
> On 12 abr, 08:27, Adrian Davis <
adr...@satisoft.com> wrote:
>
> > Is there a simple way to change ttk::combobox arrow to use another
> > image?
>
> > if so, is there an example as to how?
>
> > Many Thanks,
> > =Adrian=
[snip]
Thinking about it, it's better to define a new style for the modified
comboboxes, and leave the default style untouched.
package require Tk
set img [image create photo -data {
R0lGODlhDQAQAPQAAFw1Zl42Z2A6amE6amI7a2I8a2I8bKeHqK6BqbSLsLWLsLuV
t7ufu7yfu72hvL6ivb6ivr+jvsKgvsWlwseow8iqxcmrxs+1zNC2zdO70dS90tW9
0tW+0wAAAAAAAAAAACH5BAEAAB0ALAAAAAANABAAAAVMYCd2QFmOKJltGZCOwMZt
7kvKtH3P9RvzutgmZ4tdiL6NBUkyGTaSjMHkEjgyGcuiwnIIRoWIJUG2eFPhCYJy
fhUkmLbNcPjqRL1RCAA7}]
ttk::style element create Mystyle.downarrow image $img
ttk::style layout Mystyle.TCombobox {
Combobox.field -sticky nswe -children {
Mystyle.downarrow -side right -sticky ns
Combobox.padding -expand 1 -sticky nswe -children {
Combobox.textarea -sticky nswe
}
}
}
# default style
pack [ttk::combobox .cb1]
# "Mystyle" style
pack [ttk::combobox .cb2 -style Mystyle.TCombobox]
Regards
Emiliano