![]() |
![]() |
![]() |
![]() |
![]() |
FTP | ![]() |
![]() |
CCD | ![]() |
![]() |
Buscar | ![]() |
![]() |
Trucos | ![]() |
![]() |
Trabajo | ![]() |
![]() |
Foros | ![]() |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
|
Herramientas | Buscar en Tema | Desplegado |
#2
|
|||
|
|||
Me respondo
Código:
... type TForm1 = class(TForm) ... procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private procedure ActiveCtrlChange(Sender: TObject); ... end; ... implementation uses TypInfo; const FOCUSEDCOLOR = clMoneyGreen; UNFOCUSEDCOLOR = clWindow; var PrevFocusedCtrl: TWinControl = nil; procedure TForm1.FormCreate(Sender: TObject); begin Screen.OnActiveControlChange:= ActiveCtrlChange; end; procedure TForm1.ActiveCtrlChange(Sender: TObject); begin if not Assigned(PrevFocusedCtrl) then PrevFocusedCtrl:= ActiveControl; if Assigned(GetPropInfo(PrevFocusedCtrl.ClassInfo, 'Color')) then begin // SetOrdProp(PrevFocusedCtrl, 'Color', UNFOCUSEDCOLOR); if PrevFocusedCtrl.StyleElements = [seBorder] then PrevFocusedCtrl.StyleElements:=[seFont, seClient, seBorder]; end; if Assigned(GetPropInfo(ActiveControl.ClassInfo, 'Color')) then begin SetOrdProp(ActiveControl,'Color', FOCUSEDCOLOR); Activecontrol.StyleElements:=[seBorder]; PrevFocusedCtrl:= ActiveControl; end; end; procedure TForm1.FormDestroy(Sender: TObject); begin Screen.OnActiveControlChange:= nil; end; ... |
Herramientas | Buscar en Tema |
Desplegado | |
|
|
![]() |
||||
Tema | Autor | Foro | Respuestas | Último mensaje |
Cambiar color de los DBEdit al entrar en ellos | Delphitest | Varios | 7 | 07-02-2015 08:29:33 |
Cambiar color de letras de acuerdo al color de fondo | Adrian Murua | OOP | 2 | 15-11-2008 18:36:21 |
Mantener color verde olivo de las ventanas, al cambiar el color en windows | mancurnino | Varios | 6 | 11-03-2008 15:39:47 |
Como puedo cambiar la propiedad de edicion y no edicion a un StringGrid1 | ctronx | Varios | 2 | 25-06-2004 23:10:19 |
ayuda con color en controles activos | squenda | OOP | 6 | 11-05-2004 10:33:23 |
![]() |
|