Article was submitted by Oliver Marohn
Propertys of the OutBar Control
(without the Standartproperties like Backcolor)
Property BandIndex As Long
Get/Set the active Band
Property Bands As cBands
Get the Collection of Band-Items
Property IconListe As Object
Get/Set the Iconlist
Property TooltipBackColor As Long
Get/Set the Backcolor of the Tooltip
Property ToolTipEnabled As Boolean
true= Show Tooltips
false= Do not show Tooltips
Property TooltipFontColor As Long
Get/Set the Fontcolor of the Tooltip
Property TooltipMaxTipWidth As Long
Set teh Width of the Tooltip in Pixel. If the Text ist
larger it will be wraped
Property TopItem As Long
Get/Set the index of the first visible item in the
Band
Events of the OutBar
Control
Event BandChanged(theNewBand As cBand)
Fired if you change the Band by clicking on an BandButton.
theNewBand is, you got it, the new selected Band
Event BandMouseDown(Button As Long, x As Single, y As
Single, theBand As cBand)
You clicked on the Band. theBand is the Band you have
clicked. Usefull for Contextmenues!
Event BandMouseUp(Button As Long, x As Single, y As
Single, theBand As cBand)
You released a Mousebutton over a Band.
Event ButtonClick(theButton As cItem)
You clicked the Item theButton. Sorry for confusing
Therms.
Event ButtonMouseDown(Button As Long, x As Single, y As
Single, theButton As cItem)
You clicked on the Item. theButton is the Item you have
clicked. Also usefull for Contextmenues!
Event ButtonMouseUp(Button As Long, x As Single, y As
Single, theButton As cItem)
Any Idea?
Methoden of the OutBar
Control
Function AddBand(ButtonText As String, [key As String])
As cBand
Adds a Band with the Text ButtonText to the Control and
retuns the created Band
Propertys of
cBand
Property ButtonText As String
The Text for the Button
Property Items As cItems
The Collection of Items in this Band
Property OutBar As cOutBar
The OutBar that containing this Band
Propertys of cOutBar
Property Bands As cBands
Collection of Bands in the Control
Property IconList As Object
The Iconlist
Propertys of
cItem
Property Band As cBand
The Band containing this Item
Property IconIndex As Long
The Iconindex in the Iconlist for the Icon of this
Item.
Property Tag As String
For what ever you want
Property Text As String
The Text below the Icon of this Item
Property Tooltip As String
A String with usefull Text that will displayed if the
Mouse pause over the Item.
Sample
Dim band As cBand
Dim x As KOMOutbar.cItem
‘Connect the Iconlist to the Outbar
Control
Set ucOutbar1.IconListe = ilMitteIcons
‘Some
colors
ucOutbar1.TooltipBackColor = &HF0F0F0
ucOutbar1.TooltipFontColor = 0
ucOutbar1.TooltipMaxTipWidth = 100
ucOutbar1.BackColor = &HCFCFFF
‘ Add the first Band to the Control
Set band = ucOutbar1.AddBand("Band 1",
"Band1")
‘ Add Items to the
previous created Band
Set x = band.Items.Add("Item1", 1, band,
"I1")
‘ Set the Properties
for ths Item
x.Tag = "Anything usefull"
x.Tooltip = "This is a Demo of the OutBar Control"
‘Create the other Items
Set x = band.Items.Add("Item2", 2, band,
"I2")
x.Tag = "Nochn Tag"
x.Tooltip =
"Enen mene ming mang ping pang 2"
Set x =
band.Items.Add("Item3", 3, band, "I3")
x.Tooltip =
"Enen mene ming mang ping pang 3"
Set x =
band.Items.Add("Item4", 6, band, "I4")
x.Tooltip =
"Enen mene ming mang ping pang 4"
Set x =
band.Items.Add("Item5", 7, band, "I5")
x.Tooltip =
"Enen mene ming mang ping pang 5"
Set x =
band.Items.Add("Item6", 8, band, "I6")
x.Tooltip =
"Enen mene ming mang ping pang 6"
‘Create the other Bands
Set x = band.Items.Add("Item7", 9, band,
"I7")
x.Tooltip = "Enen mene ming mang ping pang
7"
Set x = band.Items.Add("Item8", 10, band,
"I8")
x.Tooltip = "Enen mene ming mang ping pang
8"
Set band = ucOutbar1.AddBand("Band 2",
"Band2")
Set x = band.Items.Add("Item1", 4, band,
"I1")
x.Tag = "Nochn Tag in band 2"
x.Tooltip = "Enen mene ming mang ping pang Band 2/1"
band.Items.Add "Item2", 5, band, "I2"
band.Items.Add "Ein Sehr Sehr Sehr Sehr Sehr langes Item3", 6,
band, "I3"
End
Sub
Private Sub ucOutbar1_BandChanged(theNewBand As
KOMOutbar.cBand)
Debug.Print "Band hat
gewechselt " & theNewBand.ButtonText
End Sub
Private Sub ucOutbar1_BandMouseDown(ByVal Button As
Long, x As Single, y As Single, theBand As KOMOutbar.cBand)
Debug.Print "BandMouseDown " & theBand.ButtonText
End
Sub
Private Sub ucOutbar1_BandMouseUp(ByVal Button As Long,
x As Single, y As Single, theBand As KOMOutbar.cBand)
Debug.Print "BandMouseUp " & theBand.ButtonText
End
Sub
Private Sub ucOutbar1_ButtonClick(theButton As
KOMOutbar.cItem)
Debug.Print "Click " &
theButton.Text & " / " & theButton.Tag & " / "
& theButton.band.ButtonText
End
Sub
Private Sub ucOutbar1_ButtonMouseDown(ByVal Button As
Long, x As Single, y As Single, theButton As KOMOutbar.cItem)
Debug.Print "ItemMouseDown " & theButton.Text & " /
" & theButton.Tag & " / " &
theButton.band.ButtonText
End
Sub
Private Sub ucOutbar1_ButtonMouseUp(ByVal Button As
Long, x As Single, y As Single, theButton As KOMOutbar.cItem)
Debug.Print "ItemMouseUp " & theButton.Text & " /
" & theButton.Tag & " / " &
theButton.band.ButtonText
End Sub
| The Anatomy of an Oulook Bar
Every OutBar contains 1..many Bands.
| ||||||||||