Skip to content

IconIndex Property

Description

Index of the icon to be displayed in the Pane.

Property Type

Read-write property

Syntax (Visual Basic)

Public Property IconIndex() As Long

Remarks

The IconIndex value corresponds to the ID given to an icon in the command bars collection of icons (ImageManager Control). The ID of an icon added to the ImageManagerIcons object can be any positive integer.

The picture below contains a pane with both an image and text, as well as a normal image.

Pane Images

Example

IconIndex Sample (Visual Basic)

This sample illustrates how to display icons in a StatusBar Pane.

CommandBars.Icons.AddIcons ImageManager.Icons

Set StatusBar = CommandBars.StatusBar
StatusBar.Visible = True

Dim Pane As StatusBarPane

' Add Pane with Image and Text  
Set Pane = StatusBar.AddPane(ID_INDICATOR_LOGO)  
Pane.Visible = False  
Pane.Text = "Codejock Software"  
Pane.Alignment = xtpAlignmentRight  
Pane.IconIndex = 100  
Pane.TextColor = RGB(64, 100, 176)  
Pane.BackgroundColor = RGB(245, 245, 245)  

Dim Font As New StdFont  
Font.Bold = True  
Font.Name = "Tahoma"  
Set Pane.Font = Font  
Pane.Width = 0 ' Auto size

' Add Pane with Image Only  
Set Pane = StatusBar.AddPane(ID_INDICATOR_ICON)  
Pane.IconIndex = 101  
Pane.Alignment = 1  
Pane.Width = 0 ' Auto Size

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.