[lazarus] Attach menu to window
Micha Nelissen
M.Nelissen at student.tue.nl
Wed Oct 22 14:06:27 EDT 2003
Mattias Gaertner wrote:
> On Wed, 22 Oct 2003 17:32:03 +0200
> Micha Nelissen <M.Nelissen at student.tue.nl> wrote:
>
>
>>Currently the menu is immediately attached to a window upon creation.
>>However, when creating all the entries this causes an huge delay,
>>because the window gets redrawn for every menu item change and add.
>>
>>Therefore I suggest introducing an LM_ATTACHMENUTOWINDOW or something
>>alike. Then all menu items are created first and when all is done a
>>message sent attaching the menu causing a redraw only once. The message
>>could be sent from TCustomForm.CreateWnd after FMenu.HandleNeeded for
>>example.
>>
>>Please, someone from the GTK team respond for comments :).
>
>
> The gtk-interface does not care, if you first create the child handles and
> then attach the menu item, or if you attach and then create the child
> handles.
>
> I think, it would be better if the childs are created first and then the
> menu item is attached. This was the case some months ago, but for some
> strange win32 reasons it was necessary to switch it.
>
> Can we switch back.
Those 'strange' win32 reasons were strange to me then, and still are :(.
Too bad the writer doesn't respond or has left.
But: there 2 attach'types':
1) attach menuitem to another menuitem (submenus)
2) attach menuitem (mainmenu) to window
In the discussion from 1 july I was talking about the first. Now I am
talking about the second one :).
But since menu attachment to window is now done implicitly, and I
suggest to do it explicitly, no harm should result in this change. (If
the gtk now does it implicitly, and I send the message explicitly, but
it doesn't respond, there's no problem because it has already done it
implicitly).
Is my post clearly enough written?
Micha.
More information about the Lazarus
mailing list