Hola,
Gracias
egostar. Repasando el asunto, parece que no queda muy claro que se llame la función "EmptyTextProperty" y retorne "false" si algún control tiene su propiedad "Text" vacía... pareciera que debería ser al revés, es decir:
Código Delphi
[-]
function EmptyTextProperty(controls:
array of TWinControl): boolean;
var
i: integer;
buffer: array [0..MAX_PATH] of char;
begin
result := true;
for i := Low(controls) to High(controls) do begin
GetWindowText(controls[i].Handle,buffer,Length(buffer));
if (Trim(buffer) = EmptyStr) then begin
result := true;
break;
end
else
result := false;
end;
end;
De este modo ahora se "lee" mejor:
Código Delphi
[-]
if EmptyTextProperty([Control1,Control2]) then
else
Creo que así se lee mejor y más claro. ¿Verdad?
