Fórum coloco uma cor aparece outra! #222628
26/03/2004
0
que que eu faço?
Linhares
Curtir tópico
+ 0Posts
26/03/2004
Rômulo Barros
Gostei + 0
26/03/2004
Fabio.hc
procedure TForm1.FormCreate(Sender: TObject); begin Screen.OnActiveControlChange := ColorControl; end; procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin Screen.OnActiveControlChange := nil; end; procedure TForm1.ColorControl(Sender: TObject); var Cor: TColor; I: integer; begin With Screen.ActiveForm do begin for I:= 0 to ComponentCount -1 do begin if Components[I] is TCustomEdit then begin Cor := clCream; // coloque a cor desejada. AtribuiProp(Components[I], ´Color´, IntToStr(Cor)); end; end; end; end; procedure TForm1.AtribuiProp(Comp: TComponent; const PropName: string; Val: string); var PInfo: PPropInfo; begin PInfo := GetPropInfo(Comp.ClassInfo, PropName); if PInfo <> nil then begin // Trata conforme o tipo case PInfo^.Proptype^.Kind of tkInteger: SetOrdProp(Comp, PInfo, StrToInt(Val)); tkChar, tkWChar: SetOrdProp(Comp, PInfo, ord(Val[1])); tkEnumeration: SetOrdProp(Comp, PInfo, GetEnumValue(PInfo^.PropType^, Val)); tkFloat: SetFloatProp(Comp, PInfo, StrToFloat(Val)); tkString, tkLString, tkWString: SetStrProp(Comp, PInfo, Val); tkVariant: SetVariantProp(Comp, PInfo, Val); tkInt64: SetInt64Prop(Comp, PInfo, StrToInt64(Val)); else ShowMessage(´Este tipo não é suportado por este programa´); end; end else ShowMessage(´Propriedade não achada´); end;
Gostei + 0
26/03/2004
Nildo
Depois que eu instalei a RxLib.
Gostei + 0
26/03/2004
Linhares
Gostei + 0
26/03/2004
Linhares
Gostei + 0
26/03/2004
Nildo
Gostei + 0
26/03/2004
Dedi
Dedi.
Gostei + 0
26/03/2004
Nildo
Gostei + 0
26/03/2004
Linhares
Gostei + 0
26/03/2004
Dedi
Edit1.Color:=clCream;
a cor realmente não é a mesma....é mais clara.
Gostei + 0
26/03/2004
Linhares
Gostei + 0
26/03/2004
Dedi
Edit1.Color:=$009FC7EF;
e a cor se manteve.
Dedi.
Gostei + 0
26/03/2004
Dedi
Gostei + 0
26/03/2004
Rômulo Barros
Utilizo Delphi 7.0 + XP e não tenho a droga da Rxlib instalada, entretanto, o erro ocorre comigo :P
Gostei + 0
26/03/2004
Beppe
Se a cor naum for da paleta do Windows mas tiver AA <> 0, entaum
isso dv funcionar
C and $ffffff;
onde C é uma variável ou uma constante TColor.
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)