[lazarus] Attach menu to window

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Oct 22 12:49:04 EDT 2003


On Wed, 22 Oct 2003 17:32:03 +0200
Micha Nelissen <M.Nelissen at student.tue.nl> wrote:

> Hi,
> 
> 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.


Mattias






More information about the Lazarus mailing list