opentk / GLControl

WinForms control for OpenTK 4.x.
https://opentk.net
Other
54 stars 24 forks source link

OpenGL window overlaps context menus in WinForms designer #13

Closed dowdybrown closed 4 days ago

dowdybrown commented 2 years ago

When editing a context menu in WinForms designer, the menu is initially display over the top of the GLControl window. However, because the GLControl gets constantly refreshed due to the spinning box, it then gets displayed on top of the context menu, making context menu edits impossible. The spinning box is cool, but a static description in design mode would be more functional.

NogginBops commented 2 years ago

Thanks for the report. I was unaware that this was a problem. This is definitely something we should solve. @seanofw do you have any clues if we can solve it so that the redrawing doesn't cause this or do we have to disable that?

seanofw commented 2 years ago

I've been trying to reproduce this behavior locally, and I can't: Everything I've tried seem to work just fine. @dowdybrown Can you describe precisely how to cause the issue so we can investigate it?

seanofw commented 2 years ago

Closing this issue due to inactivity.

NogginBops commented 2 years ago

I just happened upon this issue. In design mode, if you try to edit the elements in the window menu, the GLControl renders on top of the menu items.

Here is a picture showing the issue: image

seanofw commented 2 years ago

I think this may be a bug in the Designer itself: I've since run into this problem before with other controls, not just the GLControl. If you go into the .Designer.cs file and you change the order in which the MenuStrip and GLControl are declared, instantiated, and added to the form (i.e., move the MenuStrip before the GLControl or vice versa), does the problem go away?

Actually, we can probably prove this beyond the shadow of a doubt: If you alter the GLControl so that it doesn't start the timer, does the problem still happen? Because then the GLControl won't be repainting itself at all except using "normal" GDI+ when the Designer asks it to: If the problem still happens then, the problem is probably due to the Designer, not due to the GLControl.

dowdybrown commented 4 days ago

Thank you for the fix. I look forward to testing version 4.