티클러 2025. 4. 17. 09:51

홈페이지 : http://www.binarism.com/tk/

 

LED처럼 보이는 레이블을 생성하고 사용하는 몇 가지 명령을 제공하는 확장 패키지입니다.

LED tcl package

This is a quick package I knocked up following a post on comp.lang.tcl

The file led.tcl is a tcl package providing some commands for creating and
using label that look (something) like leds.

There is no formal API, but use:

% package require led
% namespace import led::*
% led .led (options)

or just:

% package require led
% led::create .led (options)

An led is just a label widget, so it takes all the same options as a label. The
led (=led::create) command creates the label widget and also an image, so
with/height values are in pixels. If you specify a text option, it will be
ignored. The standard led size is 20x10 pixels.

There is also a command to flash the led - this just swaps the bg and fg
colors, and swaps the normal/active state. You can also disable an led by
using:

% led::state .led disabled

If the led is flashing, it will pause, and continue from where it left off when
re-activated with led::state .led normal/active. The led will always resume its
previous state (I'll make this an option for next version!)

See the demo examples for more info. demo3.tcl is for Knight Rider fans.

Let me know if you have any suggestions/ideas.

Mark /
markgsaye@yahoo.com

led-0.0.2.tgz
0.00MB