HOLA A TODOS:
A ver que les parece esto que les tiro.
Es un editor que al recibir el foco cambia de color y la apariencia de la fuente y cuando lo pierde (
al foco 
) vuelve a la normalidad.
En realidad me hacia falta algo asi y comence a diseñarlo; seguramente esta para arreglarlo y mejorarlo pero a mi me sirvio a pesar de sus defectos.
Perdonen por no haberlo comentado, me parecio que no hacia falta.
EDGARDO - Córdoba - Argentina
Código Delphi
[-]
unit CoolEdit;
interface
uses
Windows, Messages, SysUtils, Classes, Controls, StdCtrls, Graphics, Forms;
type
TCoolEdit = class(TEdit)
private
fColor : TColor;
fColorWithFocus : TColor;
fColorWithOutFocus : TColor;
fFont : TFont;
fFontFocus : TFont;
fFontNoFocus : TFont;
FColorFont : TColor;
fFontColorFocus : TColor;
fFontColorNoFocus : TColor;
Procedure SetColor(Value:TColor);
Procedure SetFont(Value:TFont);
Procedure SetColorFont(Value:TColor);
protected
Procedure WMSetFocus(var Message:TWMSetFocus);message WM_SETFOCUS;
Procedure WMKillFocus(var Message:TWMKillFocus);Message WM_KILLFOCUS;
public
Constructor Create(AOwner:TComponent);override;
Destructor Destroy;override;
published
Procedure RePaint;Override;
Property FocusColor : TColor Read fColorWithFocus Write SetColor Default clAqua;
Property NoFocusColor : TColor Read fColorWithOutFocus Write SetColor Default clSilver;
Property FocusFont : TFont Read fFontFocus Write SetFont;
Property NoFocusFont : TFont Read fFontNoFocus Write SetFont;
Property FontColorFocus : TColor Read fFontColorFocus Write SetColorFont Default clBlue;
Property FontColorNoFocus: TColor Read fFontColorNoFocus Write SetColorFont Default clBlack;
end;
procedure Register;
implementation
Var Foco : Boolean;
Constructor TCoolEdit.Create(AOwner:TComponent);
Begin
Inherited Create(AOwner);
Color:=clSilver;
fColorWithFocus:=clAqua;
fColorWithOutFocus:=clSilver;
fFontColorFocus:=clBlue;
fFontColorNoFocus:=clBlack;
End;
Procedure TCoolEdit.WMSetFocus(var Message:TWMSetFocus);
Begin
Inherited;
Foco:=True;
Repaint;
End;
Procedure TCoolEdit.WMKillFocus(var Message:TWMKillFocus);
Begin
Inherited;
Foco:=False;
Repaint;
End;
Procedure TCoolEdit.Repaint();
Begin
If Foco Then Begin
Font.Style:=[fsBold];
Font.Color:=fFontColorFocus;
Color:=fColorWithFocus;
End
Else begin
Font.Style:=[];
Font.Color:=fFontColorNoFocus;
Color:=fColorWithOutFocus;
End;
End;
Procedure TCoolEdit.SetColor(Value:TColor);
Begin
If fColor <>Value Then Begin
fColor:=Value;
Repaint;
End;
End;
Procedure TCoolEdit.SetFont(Value:TFont);
Begin
If fFont<>Value Then Begin
fFont:=Value;
Repaint;
End;
End;
Procedure TCoolEdit.SetColorFont(Value:TColor);
Begin
If fColorFont <>Value Then Begin
fColorFont:=Value;
Repaint;
End;
End;
Destructor TCoolEdit.Destroy;
Begin
Inherited Destroy;
End;
procedure Register;
begin
RegisterComponents('Cool', [TCoolEdit]);
end;
end.