View previous topic :: View next topic |
Author |
Message |
floele
Joined: 04 Aug 2008 Posts: 22
|
Posted: Thu May 24, 2012 12:56 pm Post subject: No support for ContextMenu? |
|
|
Hi,
I'm setting to ContextMenu property of the VirtualTree to an instance of a context menu, but it doesn't have any effect. The context menu does not appear with right click.
The ContextMenuStrip property worked fine for me so far, but I do not want to use the "strip" classes because they are buggy and ugly.
Regards,
Florian |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri May 25, 2012 12:54 am Post subject: |
|
|
Sorry, Virtual Tree only supports ContextMenuStrip for context menus. This is because supporting context menus for individual rows meant we had to make a choice and in Microsoft's words "ContextMenuStrip replaces and adds functionality to the ContextMenu".
Another factor is that Virtual Trees own context menus for column headers are built using ContextMenuStrip and using a different style of context menu for the headers and rows would be inconsistent.
We haven't found ContextMenuStrip to be buggy - what issues have you had? If you turn off the ShowImageMargin property on the ContextMenuStrip then they appear similar to the old ContextMenu. _________________ Infralution Support |
|
Back to top |
|
|
floele
Joined: 04 Aug 2008 Posts: 22
|
Posted: Fri May 25, 2012 5:41 am Post subject: |
|
|
Quote: | We haven't found ContextMenuStrip to be buggy - what issues have you had? |
It doesn't look like the OS context menu. That is pretty bad. Checkable items look horrible by default. Highlighting of menu items if sub menus are involved does not work properly.
Best example of the quality of these components is the fact that the default ToolStripMenu does not work on Win2000, it only shows a black and unreadable menu bar. You can figure the amount of QA these components must have had. I really hate them from the bottom of my heart
Quote: | This is because supporting context menus for individual rows meant we had to make a choice |
I wouldn't even need that. Just make the context menu show if set. I can emulate that behaviour by using the right click event and checking the keyboard, but I'd prefer not to do that. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri May 25, 2012 6:02 am Post subject: |
|
|
You can override the ShowRowContextMenu(Row row, Point location) method and then show your context menu from there. _________________ Infralution Support |
|
Back to top |
|
|
floele
Joined: 04 Aug 2008 Posts: 22
|
Posted: Fri May 25, 2012 9:35 am Post subject: |
|
|
Ah, that's great. Thanks. |
|
Back to top |
|
|
|