Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

No support for ContextMenu?

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
floele



Joined: 04 Aug 2008
Posts: 22

PostPosted: Thu May 24, 2012 12:56 pm    Post subject: No support for ContextMenu? Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri May 25, 2012 12:54 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
floele



Joined: 04 Aug 2008
Posts: 22

PostPosted: Fri May 25, 2012 5:41 am    Post subject: Reply with quote

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 Wink

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri May 25, 2012 6:02 am    Post subject: Reply with quote

You can override the ShowRowContextMenu(Row row, Point location) method and then show your context menu from there.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
floele



Joined: 04 Aug 2008
Posts: 22

PostPosted: Fri May 25, 2012 9:35 am    Post subject: Reply with quote

Ah, that's great. Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group