Ver Mensaje Individual
  #28  
Antiguo 25-05-2014
Avatar de oscarac
[oscarac] oscarac is offline
Miembro Premium
 
Registrado: sep 2006
Ubicación: Lima - Perú
Posts: 2.010
Reputación: 20
oscarac Va por buen camino
Cita:
Empezado por pborges36 Ver Mensaje
el procedimiento AplicarColor lo tengo implementeado de la siguiente manera:

Código Delphi [-]
Procedure TBRGFocusAdmin.AplicarColor(colorf:TColor;Componente:TComponent);
begin
    try
      if (Componente is TEdit) then
        begin
            (Componente as TEdit).Color:=colorf;
        end;
      if (Componente is TComboBox) then
        begin
            (Componente as TComboBox).Color:=colorf;
        end;
      if (Componente is TDateTimePicker) then
        begin
            (Componente as TDateTimePicker).Color:=colorf;
        end;
      if (Componente is TMemo) then
        begin
            (Componente as TMemo).Color:=colorf;
        end;
      (Componente as TWinControl).Repaint;
    except
    end;
end;

Creo que solo faltaria agregar la clase del componente que estas usando.
algo como:

Código Delphi [-]
if (Componente is TDBEdit) then
        begin
            (Componente as TDBEdit).Color:=colorf;
        end;

Saludos.
erro mio me falto agregar la unidad DbCtrls...
espero q a alguien le sirva
__________________
Dulce Regalo que Satanas manda para mi.....
Responder Con Cita