[lazarus] patch for setmenu
Marc Weustink
marc at dommelstein.net
Wed Dec 17 18:16:04 EST 2003
At 23:52 17-12-2003, Darek Mazur wrote:
>Hi
>
>When I was testing SETMENU I found a bug: I have changed MAINMENU many times
>(choice from 3 MENUS) and MAINMENU has been changed only one for each first
>set MENU, second time was no change. (sorry for my english)
>
>my patch for this:
>inCUSTOMFORM.INC
>Procedure TCustomForm.SetMenu(Value : TMainMenu);
>
>
>
> FMenu := Value;
> if FMenu<>nil then begin
> FMenu.Parent:=Self;
> if HandleAllocated and (not (csLoading in ComponentState)) then begin
> FMenu.HandleNeeded;
> AttachMenuToWindow(FMENU); // <--- this added
> end;
> end;
Shouldn't be needed there. Isn't this something for the interface ?
Marc
More information about the Lazarus
mailing list