Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-10

Attach menu to window

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner
to Micha Nelissen: Currently the menu is immediately attached to a window upon creation. However, when…
Show quoted text 13 lines
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

Reply by email

Micha Nelissen

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 :).

Regards,

Micha.

Reply by email