Ver Mensaje Individual
  #6  
Antiguo 23-01-2010
mcsebas mcsebas is offline
Miembro
 
Registrado: feb 2008
Posts: 78
Reputación: 17
mcsebas Va por buen camino
Ahhhhhh que pasoooooooooo !!! con el fragmento de codigo

Código Delphi [-]
unit CajaTexto;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;
type
  TCajaTexto = class(TEdit)
  private
    { Private declarations }
  protected
    procedure DoEnter; override;
    procedure DoExit; override;
    procedure DoKeyPress; override;
  public
    { Public declarations }
  published
    { Published declarations }
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents('Mis Componentes', [TCajaTexto]);
end;


////////////////////////
// Recibiendo el Foco //
////////////////////////
procedure TCajaTexto.DoEnter;
begin
    inherited;
    Color:=clInfoBk;
end;


///////////////////////
// Perdiendo el Foco //
///////////////////////
procedure TCajaTexto.DoExit;
begin
    inherited;
    Color:=clWindow;
end;


////////////////////////
//Simulando Tecla TAB //
////////////////////////
procedure TCajaTexto.DoKeyPress;
begin
      inherited;
      if Key = #13 then
      begin
        Key := #0;
        Perform(WM_NEXTDLGCTL,0,0);
      end
end;
end.
Responder Con Cita