Hola a todos, llevo unos minutos declarando ese componente. Lo tengo igual a seoane, el problema, que no se como resolver, es que cuando uno cambia el contenido del edit, deja de funcionar el efecto de animación.
La diferencia con respecto a lo que tiene seoane es esta:
Código:
unit Blinklbl2;
interface
uses Blinklbl, StdCtrls, Classes;
type
TMarqueeLabelEdit = class(TMarqueeLabel)
private
FMyEdit: TEdit;
FInvertir: boolean;
procedure SetMyEdit(Value: TEdit);
protected
procedure Animar(Sender: TObject); override;
published
property MyEdit: TEdit read FmyEdit write SetMyEdit;
property Invertir: boolean read FInvertir write FInvertir;
end;
procedure Register;
implementation
procedure TMarqueeLabelEdit.Animar(Sender: TObject);
begin
if Assigned(MyEdit) then
if FInvertir then
Caption:= Copy(Caption,Length(MyEdit.Text),1) + Copy(Caption,1,Length(MyEdit.Text)-1)
else
Caption:= Copy(MyEdit.Text,2,MAXINT) + Copy(MyEdit.Text,1,1);
end;
procedure TMarqueeLabelEdit.SetMyEdit(Value: TEdit);
begin
FMyEdit := Value;
if Value <> nil then Value.FreeNotification(self);
end;
procedure Register;
begin
RegisterComponents('Curso', [TMarqueeLabelEdit]);
end;
end.
Saludos,