Hi,
I'm using Infragistics v8.3 with vs2008 and my problem is: When I put an UltraChart to a TabPage in our code and start the application the following exception is coming up:
System.ArgumentException:
Message="IGWinTooltip kann nicht zu TabControl hinzugefügt werden. Nur TabPages können direkt zu TabControls hinzugefügt werden."
(Translation: "IGWinTooltip cannot be added to TabControl. Only TabPages can be added to TabControls.")
Source="System.Windows.Forms"
StackTrace: bei System.Windows.Forms.TabControl.ControlCollection.Add(Control value) bei Infragistics.Win.UltraWinChart.IGWinTooltip.AddToControlsCollection(Control controlToAttachTo) bei Infragistics.Win.UltraWinChart.IGWinTooltip.Attach(Control chartControl) bei Infragistics.Win.UltraWinChart.UltraChart.OnLoad(EventArgs e) bei System.Windows.Forms.UserControl.OnCreateControl() bei System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) bei System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) bei System.Windows.Forms.Control.CreateControl() bei System.Windows.Forms.Control.SetVisibleCore(Boolean value) bei System.Windows.Forms.SplitterPanel.set_Visible(Boolean value) bei System.Windows.Forms.SplitContainer.CollapsePanel(SplitterPanel p, Boolean collapsing) bei System.Windows.Forms.SplitContainer.set_Panel2Collapsed(Boolean value)
How could i fix this issue?
Pat,
The current service release available on our website is 9.1.20091.2013. this version should fix the design-time problem. however the fix is actually in IGWinToolTip.AddToControlsCollection and not UltraChart.OnLoad.
to the man,
i ran your sample project against the build scheduled to be released in may. there is still a problem, so the scenario in 10779 must be slightly different from yours. i entered a new bug, # 17442. we'll try to get this fixed for the june service release.
We upgraded from 8.3.20083.2021 to 9.1.20091.2012 and started seeing this problem.
We host the DesignSurfaces within our application. The issue is occuring within these views that are in design mode. The same view not in design mode works fine. The IGWinTooltip's GetControlToAttachTo( ) must be returning the MS TabControl.
Couldn't/shouldn't the UltraChart skip the call to
this.Tooltip.Attach(this);
in it's OnLoad if the control is in design mode?
Thanks David,
I appreciate how difficult it can be with the tooltip parenting. I managed to code round the issue, realising that expecting just one control in the collection and not testing for the correct one was bad programing practise anyway. My code is much more robust as a consequence.
I have attached a sample app showing tooltip offset the problem. This should be compiled against v 8.3
The tooltip offset related to use in a TabControl is pending release under another bugfix (10779). Sorry to have doubly inconvenienced you with two bugs. To be certain that the fix for 10779 addresses the issue you're experiencing, if you could provide a sample project we will add that to our criteria for verifying the fix.
The parenting issue is by design; without that design there would be problems with tooltips appearing underneath other controls. For example if your chart were in a panel centered on a form, the tooltip would not be visible outside the bounds of that panel.
I assure the tooltip's place in the control hierarchy is not random, it's actually one of the more complex pieces of our code, and as you can see it's one of the most problematic. Unfortunately we don't have a more elegant or consistent solution to this without using unmanaged code.
So the side effect of changing the control at index 0 is unavoidable, I think. Hopefully you can work around this by using the string indexer on the Controls collection, or by looping through it and finding an instance of your UserControl.
I am reviewing 10779 again now to ensure it will be fixed in the upcoming hotfix, which is currently being reviewed by our QA team. I hope we can get you over these hurdles quickly so you can get back to coding your app instead of struggling with our bugs so much.