background cursor foreground height
See the options manual entry for details on the standard options.
Name: aspect Class: Aspect Command-Line Switch: -aspect Default value: 2.0
Name: colon Class: Colon Command-Line Switch: -colon Default value: 0
Name: point Class: Point Command-Line Switch: -point Default value: 0
Name: tilt Class: Tilt Command-Line Switch: -tilt Default value: 0
Name: value Class: Value Command-Line Switch: -value Default value: 8
The lcdigit command creates a widget that depicts a 7 segment digit, and a new Tcl command whose name is pathname. The command is then used to invoke various methods of the widget. The command has the general form:
pathName option ?arg arg ... arg?
The lcdigit will resize itself to fill the available height. It will adjust its width to maintain the specified aspect ratio. Drawing the colon or the decimal point increases the width of the widget so that the usual spacing on both sides is preserved, with the digit being the same height and aspect ratio.
package require Dmhwidgets frame .lcdigits -background grey22 pack .lcdigits -expand 1 -fill both -padx 4m -pady 4m dmhwidgets::lcdigit .lcdigits.d1 -point 1 dmhwidgets::lcdigit .lcdigits.d2 dmhwidgets::lcdigit .lcdigits.d3 pack .lcdigits.d1 .lcdigits.d2 .lcdigits.d3 -side left -expand 0 -fill y # NOTE: If you want to aggregate digits to display numbers, you probably # want to use the lcdisplay widget. proc lcdigits_show d { set d1 [expr int($d)] set d2 [expr int(10 * ($d - int($d)))] set d3 [expr int(10 * (10*$d - int(10*$d)))] .lcdigits.d1 configure -value $d1 .lcdigits.d2 configure -value $d2 .lcdigits.d3 configure -value $d3 } lcdigits_show 3.27