Hi,
I have a question regarding the drawing of drop down menus.
We hava a Progress/ABL application and heavily use Infragistics controls for the UI. The application mimics some kind of MDI by using the UltraDockmanager to create tabs and host multiple windows. When the application is used via remote desktop we see that the Popup menus of the UltraToolBarManager (uses PopupMenuTools and ButtonTools) leaves a "hole" in the entire application before the menu is finally drawn. You can see parts of the window/desktop which lies behind our application.
That's very annoying when hovering over the menubar and each time a dropdown is going to happen the place where the dropdown menu will be is erased before the dropdown is visible.
The problem is only visible on remote desktops.
Is there a way to tell the ToolbarsManager not to erase the background when a dropdown is going to happen?
I tried Suspend and ResumeLayout of our UltraPanel (main panel of a window) in BeforeToolDropdown and AfterToolDropdown, but it doesn't help.
Any ideas?
Any help is appreciated!
Update: We use/allow transparency in our application. As soon as "AllowTransparency" is set to "true", the drop down menu creates those "holes". AllowTransparency = yes fixes the problem but now the user cannot enable transparent backgrounds of the UltraDock tabs.
Hello,
It sounds like the color used to render the menu or menu shadows is matching that of the TransparencyColor. Try setting the ShowMenuShadows on the UltraToolbarsManager to False and see if that helps. Otherwise, I'll probably need some sort of sample to reproduce the issue through remote desktop.
Let me know if this helps.
Chris
thanks for your help.
I set ShowMenuShadows to false, but it didn't help. (We use bright green as transparency color, so I doubt that the ToolbarsManager uses this color to draw shadows. Additionally the problem only occurs on remote desktops. So maybe its an drawing issue?)
Unfortunately its not easy to extract sample code of our application.
Maybe you have another idea of a switch?
Can the erasing of the background be disabled?
Regards,
Jörg
Hi Chris,
too bad that there isn't a simple solution.
Thanks for your help.
Hello Jörg,
Thank you for the sample. I was setting the form's Opacity via the designer, which sets the property to a percentage. Therefore, setting it to '1' was setting it to 1% which is near invisible.
Anyways, I was able to reproduce the problem you reported. Further investigation revealed our code is not doing anything in particular to cause this issue to occur. From what I can conclude, it is caused by using the TransparencyKey in conjunction with Remote Desktop. When a TransparencyKey is set and an overlapping form is shown, the background is shown until the child form receives and processes its first paint message. I've attached a modified sample that reproduces the behavior using a form and a handful of buttons (whose layout functionality should delay the first paint long enough to see the issue).
I wish I have a solution or workaround to the issue, but from my experience, tranparency has always had issues when using Remote Desktop.
I have added the sample.
BTW: An opacity value of 0 means the form will be completely invisible. So I don't understand why your form is invisible when you set the value to 1.
MSDN: The Opacity property enables you to specify a level of transparency for the form and its controls. When this property is set to a value less than 100 percent (1.00), the entire form, including borders, is made more transparent. Setting this property to a value of 0 percent (0.00) makes the form completely invisible.
Regards
Hey Jörg,
Can you attach your sample? It can be uploaded from the Options tab at the top.
I modified my sample to match the steps you provided. However, due to setting the Opacity on the form to 1, the form cannot be seen and therefore cannot interact with the menus. When I changed the Opacity to 10%, I could see the form enough to interact with the PopupMenuTools. When this tools would dropdown, the dropdown window is shown at full opacity, and I did not see the desktop background.
Thanks,
I built a small sample application. (C#, Windows Forms Application)
-Added an UltraToolbarsManager
-Added two PopUpMenuTools
-Added some PopUpMenuTools and some (>10) ButtonTools to the PopUpMenuTools.
Additionally I added a button to the ToolBarsmanager to switch Transparency on/off. (Not really necessary)
In the constructor I set Opacity to 1, AllowTransparency to yes and the TransparencKey to Color.Green. (Because those attributes are used in our application)
Now, when you run this simple app via remote desktop, you can reproduce the behavior. Before the menu is drawn you can see the desktop for a split second.