Ok I am still working on my top level menubar. I am having a problem.
I am using text buttons as the top level menu item on the menu bar. The buttons have a custom look and feel that paints it based on mouse over, mouse not over and mouse down.
I have an event handler that fires when any button is pressed, which shows the appropriate popup window.
Originaly I was displaying the popupwindow right beneath the textbutton, aligned so they look they are one component. But I found that when you exit the menu, either by selecting an item or clicking outside of it, sometimes the textbutton would repaint after the menu dissapeared, with a slight delay that appeared to be a flicker/artifact, since it wasn’t timed perfectly.
My perfectionist mindset was not happy. It did not look good.
So now I am painting my popup menus right on top of where the text button is. When I click out I am still having the problem. THe underlying text button is not being redrawn until after the menu is exited.
I tried forcing button->repaint() before calling popupmenu.showat(), but no matter what I do, the LookAndFeel event doesn’t fire until after the menu is exited.
How can I force the lookandfeel code to repaint the button to a normal state before the popupmenu is displayed, so that once the popupmenu dissapears, there will be no subsequent drawing on the button, eliminating the artifact?