SmartTag and Tooltip show behind form when undocked

SyntaxEditor for Windows Forms Forum

Posted 11 years ago by NorthGates - NorthGates Systems
Version: 12.1.0311
Platform: .NET 4.0
Environment: Windows 7 (64-bit)
Avatar

I use a third party docking/document management control and all works very well except when I undock (float) the syntaxeditor control in the 3rd party float container.

I noticed that before floating the syntaxeditor control if the smarttag was visible once, the smarttag and tooltip shows fine the first time on the floating container but the 2nd time it is requested, it appears to go between syntaxeditor control and its container.

If the smarttag never showed while docked, all works well even in floating container, and, when the smarttag do fall behind, after docking the float syntaxeditor control,it works fine again.

I wonder if it is because the syntaxeditor or perhaps one of its component do not get the message that the parent changed. It does look like the intelliprompt (perhaps the syntaxeditor as a whole) only want to reference the main form.

Is there a way to dispose and create a new intelliprompt or is there a way I can simulate a smarttag using my own control to be able to BringToFront() should the problem occur regardless.

Any suggestion?

Comments (26)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, I think you are on an older version.  Before we look into it further, can you first download the latest version to see if it still happens there too, and let us know?  Thanks!


Actipro Software Support

Posted 11 years ago by Michael Dempsey - Sr. Developer, Teradata Corp
Avatar

I am seeing the same thing with 13.1.

I wrote a Visual Studio extension in which I have a custom editor that consists of a splitter with a SyntaxEditor control in one half of the splitter.

If I have the window docked (and leave it docked) then Intellisense windows display fine.

If I undock the window I no longer see the intellisense windows because they display behind my window.

If however I undock the window BEFORE any intellisense window is displayed then the tooltips display fine. But if I then re-dock the window I no longer see the tooltip windows.

Apparently you store the window handle of the 'parent' when you first display an intellisense window and never change it after that. Therefore if the parent changes (due to dock/undock) it no longer works.

You really need to check the parent window every time since its handle can change. 

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Mike,

Can you put together a new simple sample project that shows this happening (without VS) so that we can have something to debug with and see what's going on?  Then email that over to our support address and we'll work on it.  Please reference this thread and rename the .zip file extension so it doesn't get spam blocked.  Thanks!


Actipro Software Support

Posted 11 years ago by NorthGates - NorthGates Systems
Avatar

Thanks Mike and Support. Meanwhile, is it possible to dispose of the Intelliprompt or SmartTag and have SyntaxEditor re-create it or should I just recreate an SyntaxEditor and reload the document and restoring the position and outline collapsing?

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, you'd have to recreate the SyntaxEditor to completely reset popups.  If you'd like us to look into it further, please do what we mentioned above and send us a sample that repros it.  Thanks!


Actipro Software Support

Posted 11 years ago by Michael Dempsey - Sr. Developer, Teradata Corp
Avatar

I can probably put together a sample but it would HAVE to be a Visual Studio extension since I have no way to replicate the situation in my own apps. (I dont know exactly what VS does when floating a window.)

'NorthGates' may be able to provide a sample that is not a VS extension ... but they would probably have to use their 3rd party tool in order to replicate it ... and you are unlikely to have that tool.
(You definately have Visual Studio though - it's just a bit more complex to test an extension...)

Mike

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

An example without using VS would be ideal.  Are you able to duplicate the issue with our own WinForms docking windows?


Actipro Software Support

Posted 11 years ago by Michael Dempsey - Sr. Developer, Teradata Corp
Avatar

I wasn't aware that you had a WinForms window docking control.

But if yours works the same as the DockManager control from Infragistics then the answer would be no.
(I have another app that uses the Infragistics control and I can switch between regular MDI windows and tabbed windows without any issue. I only see the issue when using Visual Studio which makes the window a completely separate top level window when undocked. [which Infragistics does not - it becomes an MDI child rather than an independent window.])

Since you have your own docking control - and presumably a sample app for that control - you could use that sample app to determine if the problem exists when using your own dock control. 

Posted 11 years ago by NorthGates - NorthGates Systems
Avatar

Sorry, it is VS2012 with DevExpress WinForms Controls.

Here is the definition:

namespace DevExpress.XtraBars.Docking2010
{
    [DesignTimeVisible(false)]
    [ToolboxItem(false)]
    public class DocumentContainer : Control, IFloatDocumentFormInfoOwner, IButtonsPanelOwner

 I must plow along, I will simply create my SEd documents floating, load Intelliprompt then dock hopfully without too much visual interference or just double the SEd and do a swap when this situation occur.

Let me know if a sample is still needed and if you think the problem is resolved.

 

Cheers

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hmm, I'm not sure.  I did a quick test with our own docking windows product and it worked fine.  I displayed a member list while the SyntaxEditor was docked in the main window, rafted the tool window, showed the member list again ok, re-docked the tool window, showed the member list again, etc.


Actipro Software Support

Posted 11 years ago by Michael Dempsey - Sr. Developer, Teradata Corp
Avatar

Pity. As far as I can see SyntaxEditor creates a window [presumably with a specific parent] the first time we request an Intellisense window. Then you simply hide it and re-display it the next time we need an intellisense window.
(This is presumably for performance reasons)

What we need is a way to 'reset' that window. Either by destroying it or re-parenting it.

Which way you do it makes no difference to us, but we need a method that we can call to tell you that something has changed and the intellisense window needs to be reinitialized.

An application like ours would then call that method whenever the user floats or re-docks an editor window.
This should allow us to reset the window so that it correctly displays in front of the new window.

Posted 11 years ago by NorthGates - NorthGates Systems
Avatar

Hi Support, the member list is not problem on my side, docked or undocked it reads my XmlSyntaxLanguage XSDs and represent them very well, it is the SmartTag where we hook context menu on its click. I just ran another test and even if shown only after floating, once docked it will show once only afterwards it falls behind the control.

I agree with Mike, a mechanism that we decide on the parent would work well. For example BeforeSmartTagShown, in the eventargs we could set the desired SmartTag Owner.

Thanks for looking into this.

Posted 11 years ago by NorthGates - NorthGates Systems
Avatar

Ooops, same problem with intellisense and my XmlSyntaxLanguage tooltip, on floating window they fall back.

[Modified 11 years ago]

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi guys,

You said it happens in the IntelliPrompt popups.  We specifically tested the member list.  Do you see it happening with that?

From what I can see in our popup code, it looks like we do reassign the popup's owner handle each time it is shown.  But depending on if a certain windows message gets called, that updated owner handle may or may not take effect.  Perhaps that is the scneario you are running into.

Anyhow, we really need as simple of a sample as you can provide so that we can debug this.


Actipro Software Support

Posted 11 years ago by NorthGates - NorthGates Systems
Avatar

I just upgraded to the latest version of Syntax Editor. I use a 3rd partie (DevExpress) dock manager. Would you still like a sample in VS2012?

Otherwise we could arrange a remote session to demo what happens.

Posted 11 years ago by Michael Dempsey - Sr. Developer, Teradata Corp
Avatar

Hopefully you can get what you need from NorthGates because when I tried replacing the editor in a simple Visual studio Extension sample from Microsoft the new editor window [now using SyntaxEditor] closes immediately after it opens.

It could take a while to debug what is going on there.

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Unfortunately we can't really debug it with a remote session or with another third party set of components.  We would need you to make a new simple sample project that shows it happening either with our own docking system or with regular Forms.  Then send that over to us and we will look into it.  Thanks!


Actipro Software Support

Posted 11 years ago by NorthGates - NorthGates Systems
Avatar

Thanks Support and Mike for trying. Unfortunately it took a long time to get where I am and to make a sample without third party controls defeats the purpose. As I mentioned earlier in this thread I upgraded to the latest version and it would be great if we could resolve this issue.

It looks like the entire Intelliprompt falls back to the main form as the owner and it looks like the SmartTag (on click) is the item causing the issue.

So far when I float an editor when I already triggered the Intelliprompt once while docked:

  • When the SmartTag becomes visible then I click on it, my context menu shows but the SmartTag falls behind the floating form but stays over the main form.
  • The tooltip falls behind the floating form but stays on top of the main form.
  • The Intelliprompt picklist falls behind the floating form but stays on top of the main form.
When I float an editor before triggering the Intelliprompt:
  • The SmartTag shows over my floating form.
  • The tooltip shows over the floating form
  • The Intelliprompt picklist shows over the floating form.
If I dock the floating form, all works well even when I floated the form before triggering Intelliprompt but, refloating the form will cause the issue again.
 
If we could manipulate (looks like the SmartTag), perhaps we can apply a work around.

Many thanks for looking into this issue as many others likely face or will likely face the same issue.

P.S. A while back I developed an app using a free docking control and the same thing was happening.

The remote session still stands if it would help even a little.

[Modified 11 years ago]

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, it's not as straightforward as just getting rid of the popups and then recreating them, since a number of properties you set on the various IntelliPrompt objects get stored on controls within the popups.  So those settings would all be wiped out.  We really need something simple to debug with to be able to work on this.  If you have a free docking system that you said repro'ed this, then a simple example with that would be fine to send over.  We can use that to debug and test any changes with.


Actipro Software Support

Posted 11 years ago by NorthGates - NorthGates Systems
Avatar

Thanks Support, I created a sample and will email shortly.

Posted 11 years ago by NorthGates - NorthGates Systems
Avatar

I submitted a support ticket yesterday including the sample project but today I looked in my tickets and there is no mention of it.

Can you confirm it is the place to submit the sample? Meanwhile I will reply with the sample to the email last thread of this conversation.

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, per above, please rename the .zip file extension (to something like .txt) since if you don't, the mail servers will sometimes block it.  That's most likely what happened, as we never got the e-mail.  Please try sending it again to our support address with a renamed .zip file extension.  Thanks!


Actipro Software Support

Answer - Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Mike,

Just FYI, we've been working with NorthGates and think we have changes in place that resolve this.  They will be in the next maintenance release.


Actipro Software Support

Posted 11 years ago by Michael Dempsey - Sr. Developer, Teradata Corp
Avatar

Good news.
Do you have an estimated date when the next maintenance release will be available?

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Mike,

We are still collecting changes for it so I'm not sure yet but if you write our support address, I can give you a link to a preview build to test out.


Actipro Software Support

Posted 11 years ago by Michael Dempsey - Sr. Developer, Teradata Corp
Avatar

I'll wait for the actual build.

I was just rying to determine whether it would be available to include in our next release. But based on your answer that is very unlikely since I would need it by mid-November at the latest.

The latest build of this product (v24.1.0) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.