Here is more information and a work around for anyone else that runs into this issue.This is not directly an ArcGIS issue, more of a .NET issue, but it does affect Add-Ins that use Windows Forms.After more reading today, I believe ArcObjects 10.0 for .NET is using the older GDI+ (from .NET 1.0/1.1) and the Graphics class rather than the newer GDI and TextRenderer class introduced in .NET 2.0.More info here on MSDN.It seems the autoellipsis tooltip for overflowed text in Label controls is indeed broken by setting either the control's UseCompatibleTextRendering property to true, or the global Application.SetCompatibleTextRenderingDefault(true). I have tested this in both VS C# 2008 and .NET 3.5, and VS C# 2010 with .NET 4.0, and on Windows 7 and Vista.A quick workaround is to just add some code to the Label's Paint event, which can be shared among any number of Label controls (set AutoEllipsis=true, AutoSize=false):
private void someLabel_Paint(object sender, PaintEventArgs e)
{
// This code requires a ToolTip control on the form named toolTip.
Label thisLabel = sender as Label;
// Set a rectangle size with same width and larger height than label's.
SizeF layoutSize = new SizeF(thisLabel.Width, thisLabel.Height + 1);
// Get the actual size of rectangle needed for all of text.
SizeF fullSize = e.Graphics.MeasureString(thisLabel.Text, thisLabel.Font, layoutSize);
// Set a tooltip if not all text fits in label's size.
if (fullSize.Width > thisLabel.Width || fullSize.Height > thisLabel.Height)
{
toolTip.SetToolTip(thisLabel, thisLabel.Text);
}
else
{
toolTip.SetToolTip(thisLabel, null);
}
}
Another workaround is to create a new label control that inherits Label, and overrides the OnPaint method with similar code, which is what I ended up doing.-Jeff H