Behavior diff between VS and SyntaxEditor

SyntaxEditor for Windows Forms Forum

Posted 12 years ago by Kelly Leahy - Software Architect, Milliman
Version: 4.0.0249
Avatar
This is not terribly important, but anyway I'm wondering if we can make a small change in the behavior of smart tags.

In VS2005, smart tags open a "context menu"-like control when they are clicked. As such, I have implemented my code to do the same. As you have already made the change to auto-hide the smart tag after a small amount of time (5 sec default), the behavior is close to VS2005. However, when a VS2005 smart tag is clicked, the smart tag stays visible until the context menu is clicked, regardless of how long the menu is left open. It does not "auto-hide" while the menu is open. Also, the "down arrow" stays visible once it is clicked (and the menu is open).

Once the menu is dismissed, the smart tag is hidden.

Easiest way I can see for this to work is this:
1) provide a way to tell an individual smart tag that it has a menu open and it should not autohide. Probably should be able to tell it to turn autohide back on when the menu is dismissed.
2) modify the behavior of the UI elements to work slightly differently (i.e. keep the arrow visible when the drop down is displayed - we might be able to use the same method as #1 for this).

Thanks,
Kelly

Kelly Leahy Software Architect Milliman, USA

Comments (8)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ok for the next maintenance release it should no longer auto-hide if the smart tag is expanded (with the drop-down arrow).

In the sample (when you paste something in the SDI editor), the drop-down arrow remains visible while the menu is displayed. Are you not seeing this happen?


Actipro Software Support

Posted 12 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
Interesting.

The arrow does stay there on the demo, but it doesn't in my code. The only difference being that I'm using the winforms ContextMenuStrip control instead of your menu control. Any idea why I'm seeing the different behavior?

Kelly Leahy Software Architect Milliman, USA

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Maybe standard context menus are modal while those are not. Could you turn auto-hide off temporarily while the menu is displayed and turn it back on after?

If you can do that I can ensure that the code will stop the timer when you turn it off (this may not be the case in the bits you have).


Actipro Software Support

Posted 12 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
I don't think auto-hide has anything to do with the behavior we're currently talking about does it? We're talking about the arrow staying or going away when the mouse leaves the smart tag (after having clicked on it).

Kelly Leahy Software Architect Milliman, USA

Posted 12 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
OK... I replaced my standard context menu with your OwnerDrawContextMenu. It keeps the arrow now. That seems to indicate that your menu is modal, but the winforms one is not.

The problem is that I really prefer the appearance of the winforms menus (hover over highlighting, etc.). Can I have a way to tell the arrow to stay / go manually? I can then put an event handler on my MenuClosing to hide the arrow / smart tag, but keep it after clicking?

Does this make sense what I'm trying to get after?

Kelly Leahy Software Architect Milliman, USA

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes, exactly. Sorry about the other post being wrong, it's a crazy day here. :) So you think something like adding a IntelliPromptSmartTag.IsPopupDisplayed property would be good? I don't think we can add it to the SmartTag itself because that's not tied into the UI at all.


Actipro Software Support

Posted 12 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
Yes. I think that's perfect, so long as my changing it will appropriately update the UI when necessary.

BTW, thanks a bunch for the level of support you provide. I've never liked third-party controls mostly because I've never received support like yours. While I have a few complaints about the lack of examples for certain things... I definitely LOVE the support and the control you provide. Feel free to use my comments any time you like.

Thanks,

Kelly Leahy Software Architect Milliman, USA

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Just tested it with a ContextMenuStrip and it seemed to work ok with the code changes I've made for the next maintenance release.

Thanks for the comments. If you'd ever like to submit a customer testimonial, please do. They are short 2-3 sentences (300 chars max) and will rotate on the home page and link back to your site.

You can do this here:
http://www.actiprosoftware.com/Company/SubmitTestimonial.aspx


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 7 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.