Hi When I was testing SETMENU I found a bug: I have changed MAINMENU many times (choice…
Marc Weustink wrote 28 lines
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 FMenunil 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 ?
It is needed. If menus have been created, then there is no call to the interface anymore.
Patch applied. Thanks,
Micha.
