'宣言 Public Property ToolTipTextStyle As ToolTipTextStyle
public ToolTipTextStyle ToolTipTextStyle {get; set;}
ToolTipTextStyle.Default に設定されている場合、プロパティは以下のように ToolTipText または ToolTipTextFormatted プロパティに基づき解決されます。
ToolTipText が設定され、ToolTipTextFormatted が設定されていない場合、プロパティは ToolTipTextStyle.Raw に解決します。
ToolTipTextFormatted が設定され、ToolTipText が設定されていない場合、プロパティは ToolTipTextStyle.Formatted に解決します。
両方のプロパティが設定されている場合、ToolTipTextStyle.Formatted が使用されます。
Imports Infragistics.Win Imports Infragistics.Win.UltraWinToolTip ' Set the style of all tooltips to Formatted so they will use Formatted text by default. ' This setting can be overridden on any UltraToolTipInfo. Me.UltraToolTipManager1.ToolTipTextStyle = ToolTipTextStyle.Formatted ' Get the tooltip info for the first text box. Dim toolTipInfo As UltraToolTipInfo = Me.UltraToolTipManager1.GetUltraToolTip(Me.TextBox1) ' Give the tooltip some formatted text. toolTipInfo.ToolTipTextFormatted = "This is a <span style=""font-weight:bold;"">formatted</span>&edsp;<span style=""color:Red;"">tooltip</span>." ' Get the tooltip info for the second text box. Dim toolTipInfo2 As UltraToolTipInfo = Me.UltraToolTipManager1.GetUltraToolTip(Me.TextBox2) ' Set the (unformatted) ToolTipText toolTipInfo2.ToolTipText = "This is an unformatted tooltip" ' Since the ToolTipTextStyle of the UltraToolTipManager is set to Formatted, textBox2 will ' not show a tooltip, since it's ToolTipTextFormatted property has not been set. In order to ' show an Unformatted tooltip, we must set the ToolTipTextStyle on it's UltraToolTipInfo to ' override the UltraToolTipManager.ToolTipTextStyle setting. toolTipInfo2.ToolTipTextStyle = ToolTipTextStyle.Raw
using Infragistics.Win; using Infragistics.Win.UltraWinToolTip; // Set the style of all tooltips to Formatted so they will use Formatted text by default. // This setting can be overridden on any UltraToolTipInfo. this.ultraToolTipManager1.ToolTipTextStyle = ToolTipTextStyle.Formatted; // Get the tooltip info for the first text box. UltraToolTipInfo toolTipInfo = this.ultraToolTipManager1.GetUltraToolTip(this.textBox1); // Give the tooltip some formatted text. toolTipInfo.ToolTipTextFormatted = "This is a <span style=\"font-weight:bold;\">formatted</span>&edsp;<span style=\"color:Red;\">tooltip</span>."; // Get the tooltip info for the second text box. UltraToolTipInfo toolTipInfo2 = this.ultraToolTipManager1.GetUltraToolTip(this.textBox2); // Set the (unformatted) ToolTipText toolTipInfo2.ToolTipText = "This is an unformatted tooltip"; // Since the ToolTipTextStyle of the UltraToolTipManager is set to Formatted, textBox2 will // not show a tooltip, since it's ToolTipTextFormatted property has not been set. In order to // show an Unformatted tooltip, we must set the ToolTipTextStyle on it's UltraToolTipInfo to // override the UltraToolTipManager.ToolTipTextStyle setting. toolTipInfo2.ToolTipTextStyle = ToolTipTextStyle.Raw;