if ($w->cget( '-colorstate' )) { my $color; if( $state eq 'normal' ) {                  # Editable    $color = '#ffffff'; } else {                                    # Not Editable    $color = $w->cget( -background ) || 'lightgray'; } # $entry->Subwidget( 'entry' )->configure( -background => $color ); $entry->configure( -background => $color );    }