'宣言 Public Overloads Function GroupFromPoint( _ ByVal x As Integer, _ ByVal y As Integer _ ) As UltraExplorerBarGroup
public UltraExplorerBarGroup GroupFromPoint( int x, int y )
このメソッドを使用して、UltraExplorerBarGroup がマウス カーソルの下にあるかどうかを判断するためのヒット テストを実行できます。
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinExplorerBar Private Sub ultraExplorerBar1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ultraExplorerBar1.MouseMove ' Display the name of the Group or Item under the current mouse point. Dim item As UltraExplorerBarItem = Me.ultraExplorerBar1.ItemFromPoint(e.X, e.Y) If Not item Is Nothing Then Debug.WriteLine("Mouse is over Item '" + item.Text + "'") Return End If Dim group As UltraExplorerBarGroup = Me.ultraExplorerBar1.GroupFromPoint(e.X, e.Y) If Not group Is Nothing Then Debug.WriteLine("Mouse is over Group '" + group.Text + "'") Return End If End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinExplorerBar; private void ultraExplorerBar1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { // Display the name of the Group or Item under the current mouse point. UltraExplorerBarItem item = this.ultraExplorerBar1.ItemFromPoint(e.X, e.Y); if (item != null) { Debug.WriteLine("Mouse is over Item '" + item.Text + "'"); return; } UltraExplorerBarGroup group = this.ultraExplorerBar1.GroupFromPoint(e.X, e.Y); if (group != null) { Debug.WriteLine("Mouse is over Group '" + group.Text + "'"); return; } }