Page 1 of 1

MaxLablesWidth

Posted: Tue Jul 11, 2006 9:27 pm
by 9790735
I am getting the exception below when manipulating the axes positions.
From axis.MaxLabelsWidth()

it is intermittent.

is this a know issue?

thanks,



System.ArgumentException was unhandled by user code
Message="Parameter is not valid."
Source="System.Drawing"
StackTrace:
at System.Drawing.Graphics.MeasureString(String text, Font font, SizeF layoutArea, StringFormat stringFormat)
at System.Drawing.Graphics.MeasureString(String text, Font font, SizeF layoutArea)
at System.Drawing.Graphics.MeasureString(String text, Font font)
at Steema.TeeChart.Drawing.Graphics3DGdiPlus.MeasureString(ChartFont f, String text)
at Steema.TeeChart.Drawing.Graphics3D.TextWidth(String text)
at Steema.TeeChart.Chart.MultiLineTextWidth(String s, Int32& numLines)
at Steema.TeeChart.AxisLabels.InternalLabelSize(Double value, Boolean isWidth)
at Steema.TeeChart.AxisLabels.LabelHeight(Double value)
at Steema.TeeChart.Axis.get_CalcIncrement()
at Steema.TeeChart.Axis.MaxLabelsValueWidth()
at Steema.TeeChart.Axis.MaxLabelsWidth()
at TE.TI.Trend.UI.TrendControl.SetAxisPlacement() in E:\workspaces\trend\tipsinfoviewer\src\TE.TI.Trend.UI\TrendControl.cs:line 589
at TE.TI.Trend.UI.TrendControl.SetupCurveAppearance(TrendItem item, TrendItemProperty[] trendItemProperties) in E:\workspaces\trend\tipsinfoviewer\src\TE.TI.Trend.UI\TrendControl.cs:line 365
at TE.TI.Trend.UI.TrendControl.SelectedTrend_AfterTrendItemChanged(TrendModel sender, TrendItemChangedArguments args) in E:\workspaces\trend\tipsinfoviewer\src\TE.TI.Trend.UI\TrendControl.cs:line 104
at TE.TI.Trend.Library.Data.TrendModel.AfterTrendItemChangedHandler.Invoke(TrendModel sender, TrendItemChangedArguments args)
at TE.TI.Trend.Library.Data.TrendModel.FireAfterTrendItemChanged(TrendItemChangedArguments arguments) in E:\workspaces\trend\tipsinfoviewer\src\TE.TI.Trend.Library.Data\TrendModel.cs:line 302
at TE.TI.Trend.Library.Data.TrendItem.SetItemProperty(TrendItemProperty attribute, Object value, Boolean fireEvent) in E:\workspaces\trend\tipsinfoviewer\src\TE.TI.Trend.Library.Data\TrendItem.cs:line 747
at TE.TI.Trend.UI.TrendGridBase.TrendGridBase_AfterCellUpdate(Object sender, CellEventArgs e) in E:\workspaces\trend\tipsinfoviewer\src\TE.TI.Trend.UI\TrendGridBase.cs:line 492
at Infragistics.Win.UltraWinGrid.UltraGrid.OnAfterCellUpdate(CellEventArgs e)
at Infragistics.Win.UltraWinGrid.UltraGrid.FireEvent(GridEventIds id, EventArgs e)
at Infragistics.Win.UltraWinGrid.UltraGridCell.SetValue(Object value, Boolean suppressErrorMessagePrompt, Boolean fireInitializeRow, Boolean throwExceptionOnError)
at Infragistics.Win.UltraWinGrid.UltraGridCell.CommitEditValue(Boolean& stayInEdit, Boolean fireDataError, Boolean forceDontThrowException, Boolean dontStoreInUndoHistory)

Posted: Tue Jul 11, 2006 9:52 pm
by 9790735
I forgot to mention, I am using teechart build v2.0.50727

Posted: Tue Jul 11, 2006 9:53 pm
by 9790735
wrong version. it is v2.0.2306.26232

Posted: Wed Jul 12, 2006 8:04 am
by narcis
Hi matthbri,

Could you please send us an example we can run "as-is" to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.

Posted: Wed Jul 12, 2006 5:35 pm
by 9790735
that is quite difficult to do. The application depends on our historian server data.
If I can find an easy way to reproduce it, I will post the code.

what I can tell you is the function is called during an update from a grid updated event (infragistics) and it works perhaps 9 times out of 10.
I have wrapped it in a try-catch to get a work-around.

Posted: Thu Jul 13, 2006 10:16 am
by narcis
Hi matthbri,

It could be really useful if you could create an example project reproducing the error we can run "as-is". You may use random data or manually populate series reproducing your original data behaviour. Otherwise it is very difficult for us to guess what's hapenning.

Thanks in advance.