Oppure

Loading
22/04/10 3:45
camaleonteplus
Questo componente lo dovresti conoscere avrei bisogno di un tuo aiuto:

Quando ren che è un label si trova al di sotto di 30 mi dovrebbe lampeggiare verde quando è tra 31 e 60 giallo e quando supera il 61 dovrebbe lampeggiare rosso come posso fare?

Grazie del tuo aiuto.

[ALed], Freeware with source.

Replaces: TAutoLed V2.01 by Chang Ting SU (ctsu@ms12.hinet.net) end Howard Harvey
Author: DelphiRuby
email: delphiruby@gmail.com
Web: delphiruby.com
Date: 03/11/2002
Version: 1.20

DESCRIPTION
-----------
Dynamic resizing is possible, but the 6 predefined versions are best.
Resizing upwards is acceptable, but resizing downwards results in loss of clarity.
Resizing requires a definition of the form
ALED1.width := NewWidth ;
ALED1.height := NewHeight ;
to be executed when the form is first drawn or after each change in the style
or colours.

Dynamic selection of the LED style is also possible (try doing that in hardware!)

Any defined system colour can be independently defined for the ON and OFF states.
Blinking (when ON state selected) is provided, with user selectable blink rate.

[Event]
OnClick,
*OnMouseEnter,
*OnMouseLeave,
*OnTimer(When Blink is true)
[Properties]
Blink(True or False),
FalseColor(when Value is false)(You can select any defined color),
Hint,
Interval(Blink Interval),
LedStyle(LEDSmall,LEDLarge,LEDSqSmall,LEDSqLarge,LEDVertical,LEDHorizontal),
ShowHints(True or False),
TrueColor(when Value is true)(You can select any defined color),
Value(True or False);

Focus Colour Control for LEDs

The OnMouseEnter and OnMouseLeave events can be used to provide focus indication
by changing the LED colour (eg changing from Lime/Green to Red/Maroon when the
mouse enters the LED region and reverting to Lime/Green on exit)

Suggested True (ON) and False (OFF) Colours for LEDs are:
TrueColor FalseColor
--------- ----------
Red Maroon
Yellow Olive
Lime Green
Fuchsia Purple
Aqua Teal
Blue Navy
White Gray
Silver Black

Click Control

Using the OnClick event allows clicking the LED to initiate any desired action,
such as starting/stopping a timer or counter.

This component has been successfully tested on Delphi2, Delphi3,Delphi4,Delphi5,Delphi6
Test code is not included. The component is simple and registers
as ALed in the Extras component panel.

Revision 1.20
Mauro Rubinetti
delphiruby@gmail.com
delphiruby.com
aaa
22/04/10 8:11
Postato originariamente da camaleonteplus:

Questo componente lo dovresti conoscere avrei bisogno di un tuo aiuto:


Ma con chi parli?
22/04/10 12:10
systemgvp
Mai sentito parlare di questo componente
aaa
22/04/10 13:01
XBarboX
Postato originariamente da systemgvp:

Mai sentito parlare di questo componente

io invece non hai mai sentito nessuno parlare così XD
aaa
23/04/10 3:06
camaleonteplus
parlavo con chi conoscesse il componente.
aaa
23/04/10 5:32
Postato originariamente da camaleonteplus:

parlavo con chi conoscesse il componente.


E mica si scrive in quel modo ... :)

(EDIT: ora capisco ! Hai scritto lo stesso messaggio nel forum

delphiruby.com/forum/…

di chi ha creato il componente e questo ha un senso ... non ha senso copiare lo STESSO messaggio in altri forum, dove non si sa di cosa parli e a chi ti rivolgi!)

Comunque ... usa un semplice timer per visualizzare in modo alternato quello che ti serve ...
Ultima modifica effettuata da 23/04/10 5:41
25/04/10 2:34
camaleonteplus
questo ci avevo pensato ma non funzionerebbe, perché ho bisogno che diventi verde quando il valore rimane tra 0 e 30 giallo quando sta tra 31 e 60 e rosso quando va oltre il 61.
aaa
25/04/10 3:40
camaleonteplus
Analizzando un programma scritto da Delphiruby e seguendo i vostri suggerimenti ho fatto in questo modo:

procedure TForm2.Timer1Timer(Sender: TObject);
begin
ALed1.Value := True;
ALed2.Value := True;
ALed3.Value := True;
end;


Ma adesso come faccio ad fare in modo che mi lampeggi solo quando si trovano tra questi valori?
0-30
31-60
oltre 61?
aaa