lcl: improve TCustomForm.CMBidiModeChanged

git-svn-id: trunk@22036 -
This commit is contained in:
paul 2009-10-05 03:45:07 +00:00
parent 89b271b14f
commit 6d32896b7f

View File

@ -596,16 +596,17 @@ var
lMessage: TLMessage; lMessage: TLMessage;
begin begin
inherited; inherited;
//send CM_PARENTBIDIMODECHANGED to All Component owned by Form // send CM_PARENTBIDIMODECHANGED to all components owned by the form
{ This way is usefull for other TMenu components that need BidiMode of form changed // this is needed for menus
Like as TToolbar }
lMessage.msg := CM_PARENTBIDIMODECHANGED; lMessage.msg := CM_PARENTBIDIMODECHANGED;
lMessage.wParam := 0; lMessage.wParam := 0;
lMessage.lParam := 0; lMessage.lParam := 0;
lMessage.Result := 0; lMessage.Result := 0;
for i := 0 to ComponentCount - 1 do for i := 0 to ComponentCount - 1 do
begin begin
if not (Components[i] is TCustomControl) then //TCustomControl already has this notification // all TControl descendants have this notification in TWinControl.CMBidiModeChanged
if Components[i] is TControl then
Continue;
Components[i].Dispatch(lMessage); Components[i].Dispatch(lMessage);
end; end;
end; end;