#!/usr/bin/perl -- use strict; use warnings; use Data::Dump qw/ pp /; $Tkx::TRACE = 64; use Tkx; my $mw = Tkx::widget->new("."); my $calc = $mw->new_ttk__button( -text => "Calculate", -command => \&calculate ); $calc->g_grid( -column => 1, -row => 3, -columnspan => 2, -sticky => "ew" ); sub calculate { pp [ $calc->configure ]; $calc->configure( -background => 'red' ); } Tkx::MainLoop(); __END__ $ perl tkx-configure.pl Tkx-1-0.0s-tkx-configure.pl-8: winfo children . Tkx-2-0.0s-tkx-configure.pl-8: ttk::button .b -text Calculate -command perl::callback Tkx-3-0.0s-tkx-configure.pl-10: grid .b -column 1 -row 3 -columnspan 2 -sticky ew Tkx-4-2.9s-tkx-configure.pl-13: .b configure [ bless([ bless([ "-takefocus", "takeFocus", "TakeFocus", "ttk::takefocus", "ttk::takefocus", ], "Tcl::List"), bless(["-command", "command", "Command", "", "::perl::CODE(0xa84ecc)"], "Tcl::List"), bless(["-default", "default", "Default", "normal", "normal"], "Tcl::List"), bless(["-text", "text", "Text", "", "Calculate"], "Tcl::List"), bless(["-textvariable", "textVariable", "Variable", "", ""], "Tcl::List"), bless(["-underline", "underline", "Underline", -1, -1], "Tcl::List"), bless(["-width", "width", "Width", "", ""], "Tcl::List"), bless(["-image", "image", "Image", "", ""], "Tcl::List"), bless(["-compound", "compound", "Compound", "none", "none"], "Tcl::List"), bless(["-padding", "padding", "Pad", "", ""], "Tcl::List"), bless(["-state", "state", "State", "normal", "normal"], "Tcl::List"), bless(["-takefocus", "takeFocus", "TakeFocus", "", "ttk::takefocus"], "Tcl::List"), bless(["-cursor", "cursor", "Cursor", "", ""], "Tcl::List"), bless(["-style", "style", "Style", "", ""], "Tcl::List"), bless(["-class", "", "", "", ""], "Tcl::List"), ], "Tcl::List"), ] Tkx-5-2.9s-tkx-configure.pl-14: .b configure -background red