ListViewItem.ToolTipText プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As ListViewItem Dim value As String value = instance.ToolTipText instance.ToolTipText = value
/** @property */ public String get_ToolTipText () /** @property */ public void set_ToolTipText (String value)
マウス ポインタが ListViewItem 上に配置されたときに表示されるテキスト。


ListView.ShowItemToolTips プロパティと ToolTipText プロパティを使用する方法を次のコード例に示します。この例を実行するには、コードを Windows フォームに貼り付け、フォームのコンストラクタまたは Load のイベント処理メソッドから InitializeItemsWithToolTips を呼び出します。
' Declare the ListView. Private ListViewWithToolTips As ListView Private Sub InitializeItemsWithToolTips() ' Construct and set the View property of the ListView. ListViewWithToolTips = New ListView() ListViewWithToolTips.Width = 200 ListViewWithToolTips.View = View.List ' Show item tooltips. ListViewWithToolTips.ShowItemToolTips = True ' Create items with a tooltip. Dim item1WithToolTip As New ListViewItem("Item with a tooltip") item1WithToolTip.ToolTipText = "This is the item tooltip." Dim item2WithToolTip As New ListViewItem("Second item with a tooltip") item2WithToolTip.ToolTipText = "A different tooltip for this item." ' Create an item without a tooltip. Dim itemWithoutToolTip As New ListViewItem("Item without tooltip.") ' Add the items to the ListView. ListViewWithToolTips.Items.AddRange(New ListViewItem() _ {item1WithToolTip, item2WithToolTip, itemWithoutToolTip}) ' Add the ListView to the form. Me.Controls.Add(ListViewWithToolTips) Me.Controls.Add(button1) End Sub
// Declare the ListView. private ListView ListViewWithToolTips; private void InitializeItemsWithToolTips() { // Construct and set the View property of the ListView. ListViewWithToolTips = new ListView(); ListViewWithToolTips.Width = 200; ListViewWithToolTips.View = View.List; // Show item tooltips. ListViewWithToolTips.ShowItemToolTips = true; // Create items with a tooltip. ListViewItem item1WithToolTip = new ListViewItem("Item with a tooltip"); item1WithToolTip.ToolTipText = "This is the item tooltip."; ListViewItem item2WithToolTip = new ListViewItem("Second item with a tooltip"); item2WithToolTip.ToolTipText = "A different tooltip for this item."; // Create an item without a tooltip. ListViewItem itemWithoutToolTip = new ListViewItem("Item without tooltip."); // Add the items to the ListView. ListViewWithToolTips.Items.AddRange(new ListViewItem[]{item1WithToolTip, item2WithToolTip, itemWithoutToolTip} ); // Add the ListView to the form. this.Controls.Add(ListViewWithToolTips); this.Controls.Add(button1); }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からListViewItem.ToolTipText プロパティを検索する場合は、下記のリンクをクリックしてください。

- ListViewItem.ToolTipText プロパティのページへのリンク