Bug or desired behavior?

SyntaxEditor for Windows Forms Forum

Posted 13 years ago by Kelly Leahy - Software Architect, Milliman
Version: 4.0.0246
Avatar
I've noticed that when I have parameter info popups in my syntax editor they don't disappear when the editor loses focus. Is this the desired behavior? If so, what's the easiest way I can make them disappear when the control loses focus (it's not my desired behavior).

Thanks,

Kelly Leahy Software Architect Milliman, USA

Comments (9)

Posted 13 years ago by Matthew Smith - Developer, One Plus One Solutions Pty Limited
Avatar
Kelly,

I may be wrong, but you should be able to change this via the intellipromt property on the editor as follows:

syntaxEditor.IntelliPrompt.ParameterInfo.HideOnParentFormDeactivate = True
You can also do the same with the QuickInfo, CodeSnippets and MemberList items.

[Modified at 04/10/2007 07:38 PM]

Regards, Matt

Posted 13 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
Thanks...

What about smart tags? The button seems to stay visible even when I change forms to another form. Is there any way for me to automatically hide these buttons? Also, is there a way for the smart tag button to disappear after the mouse has been moved away for a certain duration? For instance, I think visual studio hides the button if you move away for more than a couple seconds.

Kelly Leahy Software Architect Milliman, USA

Posted 13 years ago by Matthew Smith - Developer, One Plus One Solutions Pty Limited
Avatar
Kelly,

Sorry - haven't used Smart Tags myself. They don't appear to have the same properties.

Regards, Matt

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Kelly,

There are three stages in a smart tag. The underscore-like box will stay there regardless of whether the control has focus or not. If you hover over the underscore, an icon in a popup will show. If you focus another form at that point, the icon popup will hide. The last stage is if you move the mouse over the icon popup, it will extend to show a drop-down arrow. This will also hide if you focus another form.

That is the behavior that should be happening.


Actipro Software Support

Posted 13 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
So what do you need from me to show you that the hiding you refer to is not happening? ;)

Also, would it be possible for you to have a hide-on-leave type behavior where the icon disappears after the mouse has left the vicinity of the bar for longer than x milliseconds? The reason I ask is I also have "floating" windows that are pinnable in my application and when one of those windows flies out over the syntax editor, the smart tag stays visible even though the editor is hidden by the flyout. Alternatively, could the smart tags be created in the same parent window as the editor itself so that they are moved / hidden appropriately by flyout windows? (I know this is harder to do).

Kelly Leahy Software Architect Milliman, USA

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The smart tag will hide if the editor loses focus or if a different window becomes Form.ActiveForm. But I wonder if in your case your tool window forms are owned by the main form and the main form remains Form.ActiveForm?

Anyhow, I've added a 5 second timeout for the button popup which appears to be how long Visual Studio keeps it open if the mouse is not over the the popup. This will be in the next maintenance release.


Actipro Software Support

Posted 13 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
Excellent... That's exactly what I hoped you were going to get to. Did you make the timeout configurable? That's the only other thing I'd think might be useful, if you're going to the trouble of adding a timeout.

I think my problem may be related to the fact that Form.ActiveForm probably refers to my entire application (I'm an MDI application) and so even things like changing ActiveMDIForm doesn't seem to hide the button. That's the most annoying thing - having it show up over my tool windows isn't nearly as bad as having it show up over a window that doesn't even have the syntax editor in it!

Perhaps this is something you'll want to look into. Personally, I think hiding all smart tag button popups when SyntaxEditor.Leave occurs would be a perfectly acceptable (and intuitive) solution, but that's up to you where you put that code...

Is there an easy way for me to programmatically tell the editor to hide all those popups? In that case, I can handle "Leave" on the syntaxeditor and hide them myself...

Edit: I figured out how to hide them SyntaxEditor.IntelliPrompt.SmartTag.Hide(), right?

thanks as always - GREAT SUPPORT!

[Modified at 04/12/2007 09:50 AM]

Kelly Leahy Software Architect Milliman, USA

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Kelly,

Yes the new feature for the upcoming release is:
Added code to auto-hide a visible smart tag popup button if the mouse has not been over it for the number milliseconds specified by the new IntelliPromptSmartTag.AutoHideTimeout property.

Focus processing in WinForms is very tricky. That's one thing that is definitely much easier in WPF. We can't just use leave because even moving over the smart tag popup is considered a "leave". But as you found you can programmatically hide with the method you posted. So between our new auto-hide code and that, it should handle things all right for now.


Actipro Software Support

Posted 13 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
I'll take your word for it, but I should at least let you know that I put the following code in a SyntaxEditor.Leave handler and it works just fine for me... It just took me a while to realize that would be the workaround I was looking for!
_Editor.IntelliPrompt.SmartTag.Hide();
Thanks for the quick (and late in the evening) response!

Kelly Leahy Software Architect Milliman, USA

The latest build of this product (v2020.1 build 0400) was released 22 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.