mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 11:20:32 +02:00
win32 interface: disabling a control also disables its child windows, fixes bug #9733
git-svn-id: trunk@13276 -
This commit is contained in:
parent
5bffa7b62a
commit
09ad30198a
@ -619,6 +619,26 @@ var
|
|||||||
Buddy := SendMessage(SpinEditHandle, UDM_GETBUDDY, 0, 0);
|
Buddy := SendMessage(SpinEditHandle, UDM_GETBUDDY, 0, 0);
|
||||||
Windows.EnableWindow(Buddy, Enable);
|
Windows.EnableWindow(Buddy, Enable);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure EnableChildWindows(WinControl: TWinControl; Enable: boolean);
|
||||||
|
var
|
||||||
|
i : integer;
|
||||||
|
ChildControl: TWinControl;
|
||||||
|
begin
|
||||||
|
for i := 0 to WinControl.ControlCount-1 do 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);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure DisposeComboEditWindowInfo(ComboBox: TCustomComboBox);
|
procedure DisposeComboEditWindowInfo(ComboBox: TCustomComboBox);
|
||||||
var
|
var
|
||||||
@ -1461,6 +1481,9 @@ begin
|
|||||||
RestoreStayOnTopFlags(Window);
|
RestoreStayOnTopFlags(Window);
|
||||||
EnableApplicationWindows(Window);
|
EnableApplicationWindows(Window);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if assigned(lWinControl) then
|
||||||
|
EnableChildWindows(lWinControl, WParam<>0);
|
||||||
|
|
||||||
If (lWinControl is TCustomFloatSpinEdit) then
|
If (lWinControl is TCustomFloatSpinEdit) then
|
||||||
EnableFloatSpinEditBuddy(Window, WParam<>0);
|
EnableFloatSpinEditBuddy(Window, WParam<>0);
|
||||||
|
Loading…
Reference in New Issue
Block a user