Create your own Outlook bar

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

Download files

 

The Anatomy of an Oulook Bar

OutBar
Bands
Items

Every OutBar contains 1..many Bands.
This Bands containing 1..many the Items.

 

 



Comments

  • how to download ?

    Posted by frufin on 05/31/2004 05:20pm

    Your control may be very useful, but how to get it ?
    
    Thank You for replying at frufin@club-internet.fr

    • How to download ur control project

      Posted by asrar_azmi on 08/14/2007 06:05am

      pls give the link to downnload ur control

      Reply
    • hi

      Posted by str8 on 12/17/2006 04:39am

      none

      Reply
    Reply
  • Outbar control

    Posted by blazoftsys on 03/16/2004 03:46am

    I was searching this kind of control. Unfortunately, I could not download the contents with the given link. pl. help me. at blazoftsys@rediffmail.com Sudhakar.K

    • Echo sentiments

      Posted by Greenback on 03/31/2004 12:30pm

      I've been looking for this control as well but could not download. Let me know how to get the files.

      Reply
    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Packaged application development teams frequently operate with limited testing environments due to time and labor constraints. By virtualizing the entire application stack, packaged application development teams can deliver business results faster, at higher quality, and with lower risk.

  • The hard facts on SaaS adoption in over 80,000 enterprises: Public vs. private companies Mid-market vs. large enterprise GoogleApps, Office365, Salesforce & more Why security is a growing concern Fill out the form to download the full cloud adoption report.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds