QuantumGrid - como saber se está com o foco |
Top Previous Next |
|
function IsGridFocused: Boolean; var AContainer: TcxCustomEdit; begin Result := Screen.ActiveControl is TcxGridSite; if not Result then begin AContainer := nil; if Screen.ActiveControl is TcxCustomEdit then begin AContainer := TcxCustomEdit(Screen.ActiveControl); Result := True; end else if (Screen.ActiveControl.Parent <> nil) and (Screen.ActiveControl.Parent is TcxCustomEdit) then begin AContainer := TcxCustomEdit(Screen.ActiveControl.Parent); Result := True; end; Result := Result and (AContainer.Parent is TcxGridSite); end; end; |