// ---------------------------------------------------------------------------- // Formats a property value for display to the user. // ---------------------------------------------------------------------------- string FormatForDisplay(Property stProperty, object val) { string str = stProperty.GetDisplayValue(val); // Text-valued properties. if (stProperty is TextProperty) { if (str.Length > 32) { str = str.Substring(0, 32) + "..."; } return ("\"" + str + "\""); } else { return (val.ToString()); } }