Ver Mensaje Individual
  #25  
Antiguo 30-09-2010
Avatar de pborges36
pborges36 pborges36 is offline
Miembro
 
Registrado: oct 2004
Ubicación: Argentina
Posts: 192
Reputación: 20
pborges36 Va por buen camino
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.
Responder Con Cita