The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Tk::LCD - display Liquid Crystal Display symbols.

SYNOPSIS

 $lcd = $parent->LCD(-opt => val, ... );

DESCRIPTION

Tk::LCD is a Canvas derived widget, based on a code snippet from Donal K. Fellows' Maze game. LCD symbols are displayed in elements composed of 8 segments, labeled "a" though "g", some on and some off. For instance, the number 8 requires one LCD element that has all 8 segments lit:

     b

     -
 a  | | c
     -      <------  g
 f  | | d
     _  

     e

A Tk::LCD widget can consist of any number of elements, specified during widget creation. To actually display an LCD number, either invoke the set() method, or use the -variable option.

OPTIONS

The following option/value pairs are supported:

-elements

The number of LCD elements (digits). Default is 5.

-onoutline

Outline color for ON segments.

-onfill

Fill color for ON segments.

-offoutline

Outline color for OFF segments.

-offfill

Fill color for OFF segments.

-variable

A scalar reference that contains the LCD number to display. The widget is updated when this variable changes value.

METHODS

$lcd->set($number);

Display $number in the LCD widget.

ADVERTISED WIDGETS

Component subwidgets can be accessed via the Subwidget method. This mega widget has no advertised subwidgets.

EXAMPLE

 $lcd = $mw->LCD(-variable => \$frog)->pack;
 $lcd->set(4000);
 $frog = 2001;

AUTHOR

Stephen.O.Lidie@Lehigh.EDU

Copyright (C) 2001 - 2002, Steve Lidie. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

KEYWORDS

LCD, Canvas