Print Search Rate
    
   08-24-2004, 4:26 PM
HOWTO: Returning the Band Type and Caption of the Tools on the Band

The following code will loop through the Band and Tool collections and return the Band type (0-Normal, 1-Menu, etc.) and the captions of the Tools on that Band.

Private Sub Command1_Click()
   Dim tool As ActiveBar2LibraryCtl.tool
   Set tool = GetTool("Band1")
End Sub

Private Function GetTool(ByVal bandName As String) As ActiveBar2LibraryCtl.tool
   Dim x As Integer
   For x = 0 To ActiveBar21.Bands(bandName).Tools.Count - 1
      Debug.Print ActiveBar21.Bands(bandName).Tools(x).Caption, ActiveBar21.Bands(bandName).Type
      If ActiveBar21.Bands(bandName).Tools(x).Caption = toolCaption Then
      Set GetTool = ActiveBar21.Bands(bandName).Tools(x)
   Exit For
   End If 
   Next
End Function 


Applies To:
ActiveBar 2.0
GrapeCity » Knowledge Base » KnowledgeBase f... » HOWTO: Returning the Band Type and Caption of the Tools on the Band
Privacy Policy | Copyright © 1997-2012 — GrapeCity, inc.
All trademarks mentioned are the property of their respective owners.