's picture

Issue when using context menu in GLControl

Project:The Open Toolkit library
Version:all versions

In my application, I am using an userControl inherited from GLControl ( MyChartGL : GLControl ). by overriding the OnPaint() of this control I am drawing graphs.

I need a context menu in the chart window ( MyChartGL is filled in my form and hence i dont have any blanks space left). The issue is that even though the context menu is shown, as I am overriding the OnPaint(), the menu gets cleared. To make it sure, I kept a blank space above my 'MyChartGL ' control and tried. Menu's upper half which is outside the control are remains , but the menu's lower part which came inside the 'MyChartGL ' control got vanished. Can any one please advise me how to handle this issue?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture


I am not aware of any solutions to this issue. To the best of my knowledge, this is configuration-specific. It occurs with some video cards on WinXP but not with others - and it doesn't occur at all on Vista or Win7, when Aero is enabled.

My only suggestion is to check whether your context menu is transparent - and disable transparency if it is. I don't know whether context menus can be double-buffered, but this might help too. Finally, you might be able to detect when the context menu overlaps your GLControl and avoid re-rendering the latter when that happens.'s picture


Thank you Fiddler for you response. In my case, The context menu is not transparent. Also I cannot stop rendering the control as the user is still supposed to see the graphs' progress even when context menu is opened. Worst case, I would go for creation of a context menu like appearance using another window. Anyway thanks for your tips and quick response :)