Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinToolbars
Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click
Debug.WriteLine("Properties of all currently defined toolbars ------------------------")
Debug.IndentLevel += 1
Dim toolbar As UltraToolbar
For Each toolbar In Me.UltraToolbarsManager1.Toolbars
If toolbar Is Nothing Then
GoTo NextToolbar
End If
Debug.WriteLine("Toolbar '" + toolbar.Key + "'")
Debug.IndentLevel += 1
' ツールバーの DockedColumn、DockedRow、DockedPosition、FloatingLocation、および
' FloatingSize プロパティをアクセスします
Select Case toolbar.DockedPosition
Case DockedPosition.Floating
Dim rectFloating As New Rectangle(toolbar.FloatingLocation, toolbar.FloatingSize)
Debug.WriteLine("Toolbar '" + toolbar.Key + "' is floating. Its position and size are: " + rectFloating.ToString())
Case DockedPosition.Top
Case DockedPosition.Bottom
Case DockedPosition.Left
Case DockedPosition.Right
Debug.WriteLine("Toolbar '" + toolbar.Key + "' is docked in position '" + toolbar.DockedPosition.ToString() + "'. Its DockedRow is: " + toolbar.DockedRow.ToString() + ", and its DockedColumn is: " + toolbar.DockedColumn.ToString())
End Select
' ツールバーの Index プロパティにアクセスします
Debug.WriteLine("Toolbar '" + toolbar.Key + "' has an Index in its parent collection of: " + toolbar.Index.ToString())
' ツールバーの IsMainMenuBar プロパティにアクセスします
If toolbar.IsMainMenuBar = True Then
Debug.WriteLine("Toolbar '" + toolbar.Key + "' is a main menu bar!")
Else
Debug.WriteLine("Toolbar '" + toolbar.Key + "' is NOT a main menu bar!")
End If
' ツールバーの IsStockToolbar プロパティにアクセスします
If toolbar.IsStockToolbar = True Then
Debug.WriteLine("Toolbar '" + toolbar.Key + "' is a stock toolbar!")
Else
Debug.WriteLine("Toolbar '" + toolbar.Key + "' is NOT a stock toolbar!")
End If
' ツールバーの ParentCollection プロパティにアクセスします
If Not toolbar.ParentCollection Is Nothing Then
Debug.WriteLine("Toolbar '" + toolbar.Key + "' is in a collection that contains a total of " + toolbar.ParentCollection.Count.ToString() + " entries")
End If
' ツールバーの ShowInToolbarList プロパティにアクセスします
If toolbar.ShowInToolbarList = True Then
Debug.WriteLine("Toolbar '" + toolbar.Key + "' will appear in the toolbar list")
Else
Debug.WriteLine("Toolbar '" + toolbar.Key + "' will NOT appear in the toolbar list!")
End If
Debug.IndentLevel -= 1
NextToolbar:
Next
Debug.IndentLevel -= 1
End Sub