Merged revision(s) 54484 #7950eabf8d from trunk:

win32: fix EnableChildWindows. Issue #31590
........

git-svn-id: branches/fixes_1_6@54491 -
This commit is contained in:
maxim 2017-03-27 22:25:39 +00:00
parent 8bc1f86675
commit 5b45f48de6

View File

@ -314,15 +314,12 @@ begin
if WinControl.Controls[i] is TWinControl then
begin
ChildControl := TWinControl(WinControl.Controls[i]);
if Enable then
begin
if ChildControl.Enabled then
EnableWindow(ChildControl.Handle, true);
end
else
EnableWindow(ChildControl.Handle, false);
EnableChildWindows(ChildControl, Enable); // Recursive call
if not Enable or ChildControl.Enabled then
begin
EnableWindow(ChildControl.Handle, Enable and ChildControl.Enabled);
EnableChildWindows(ChildControl, Enable and ChildControl.Enabled); // Recursive call
end;
end;
end;
end;