#!/usr/bin/env wish ttk::label .cnt -textvariable cnt ttk::entry .input -textvariable cnt -validate all \ -validatecommand {string is integer %P} ttk::button .inc -text +1 -command {incr cnt} ttk::button .dec -text -1 -command {incr cnt -1} grid .dec .cnt .inc grid .input - -