Is there a programmatic way to determine if the if the OverflowIndictorImage of an editor is visible?
Hi,
This is not the most efficient code, but you could do it using UIElements:
private bool IsOverflowIndicatorVisible(UltraTextEditor ultraTextEditor) { // Force a paint to make sure the UIElement tree is up-to-date. ultraTextEditor.Update(); // Get the control UIElement. UIElement element = ultraTextEditor.UIElement; // See if there is a EditorWithTextOverflowIndicatorUIElement element = element.GetDescendant(typeof(EditorWithTextOverflowIndicatorUIElement)); return element != null; }
Thanks, Mike. That will probably work fine, but I'm using 10.2, and assume I'll have to upgrade to another version to see the EditorWithTextOverflow~ class. Am I correct? If so, it will take me awhile to try it out. Also, what version will I need?
The reason I'm doing this is to set up some UI's to be able to detect at unit test level when translated text does not fully display, so I'm really pursuing a more general goal. Any thoughts on that would be appreciated.