Gets and sets the index of the graphic used from the available named graphics objects in the class screen file. | |
Syntax: | long = object.GraphicIndex object.GraphicIndex = long |
Description: | The GraphicIndex property is the index of
the graphic used from the available named graphics objects in the
class screen file. If the current graphic name is invalid the index
will be -1. The index is zero based and is related to the Z-order
of the graphic relative to other named graphic objects in the class
screen file. This is a calculated value and is provided to provide
a name independant way of switching to a specific named graphic in
the graphic file. When setting the property if the index is out of
range nothing happens. Example: Sub TestClass Dim cimScreen As
GefObjectModel.GefScreen Set cimScreen = CimGetScreen() Dim cimClassObj As
GefObjectModel.GefObject Set cimClassObj =
cimScreen.Object.Objects.Item("TestClass") Dim Index As Long Dim cnt As Long cnt =
cimClassObj.ClassFormat.GraphicCount For Index = 0 To cnt - 1 cimClassObj.ClassFormat.GraphicIndex
= Index cimScreen.Refresh True Next Index End Sub |
See Also: | GraphicCount , SwitchToNextGraphic , SwitchToPreviousGraphic , SwitchToFirstGraphic , SwitchToNextGraphic , SwitchToPreviousGraphic |