You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

816 lines
28 KiB
Plaintext

VERSION 5.00
Object = "{F0EB2110-3CC3-11D0-8E54-006008104BEC}#1.0#0"; "VW4Index.ocx"
Begin VB.UserControl VWTrendLegend
Appearance = 0 '2D
ClientHeight = 3225
ClientLeft = 0
ClientTop = 0
ClientWidth = 2730
ClipControls = 0 'False
DrawWidth = 2
PropertyPages = "VWTrendLegend.ctx":0000
ScaleHeight = 215
ScaleMode = 3 'Pixel
ScaleWidth = 182
ToolboxBitmap = "VWTrendLegend.ctx":0024
Begin VW4IndexLib.VWIndex idxName
Height = 300
Index = 0
Left = 0
Top = 0
Width = 1215
_Version = 65536
_ExtentX = 2143
_ExtentY = 529
_StockProps = 96
Enabled = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BackColorOff = -2147483633
ForeColorOff = -2147483630
End
Begin VW4IndexLib.VWIndex idxName
Height = 300
Index = 1
Left = 0
Top = 300
Width = 1215
_Version = 65536
_ExtentX = 2143
_ExtentY = 529
_StockProps = 96
Enabled = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BackColorOff = -2147483633
ForeColorOff = -2147483630
End
Begin VW4IndexLib.VWIndex idxName
Height = 300
Index = 2
Left = 0
Top = 600
Width = 1215
_Version = 65536
_ExtentX = 2143
_ExtentY = 529
_StockProps = 96
Enabled = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BackColorOff = -2147483633
ForeColorOff = -2147483630
End
Begin VW4IndexLib.VWIndex idxName
Height = 300
Index = 3
Left = 0
Top = 900
Width = 1215
_Version = 65536
_ExtentX = 2143
_ExtentY = 529
_StockProps = 96
Enabled = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BackColorOff = -2147483633
ForeColorOff = -2147483630
End
Begin VW4IndexLib.VWIndex idxName
Height = 300
Index = 4
Left = 0
Top = 1200
Width = 1215
_Version = 65536
_ExtentX = 2143
_ExtentY = 529
_StockProps = 96
Enabled = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BackColorOff = -2147483633
ForeColorOff = -2147483630
End
Begin VW4IndexLib.VWIndex idxName
Height = 300
Index = 5
Left = 0
Top = 1500
Width = 1215
_Version = 65536
_ExtentX = 2143
_ExtentY = 529
_StockProps = 96
Enabled = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BackColorOff = -2147483633
ForeColorOff = -2147483630
End
Begin VW4IndexLib.VWIndex idxName
Height = 300
Index = 6
Left = 0
Top = 1800
Width = 1215
_Version = 65536
_ExtentX = 2143
_ExtentY = 529
_StockProps = 96
Enabled = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BackColorOff = -2147483633
ForeColorOff = -2147483630
End
Begin VW4IndexLib.VWIndex idxName
Height = 300
Index = 7
Left = 0
Top = 2100
Width = 1215
_Version = 65536
_ExtentX = 2143
_ExtentY = 529
_StockProps = 96
Enabled = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BackColorOff = -2147483633
ForeColorOff = -2147483630
End
Begin VB.PictureBox picLine
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
CausesValidation= 0 'False
ClipControls = 0 'False
Enabled = 0 'False
Height = 300
Index = 0
Left = 1230
ScaleHeight = 240
ScaleWidth = 1185
TabIndex = 0
TabStop = 0 'False
Top = 0
Width = 1245
End
Begin VB.PictureBox picLine
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
CausesValidation= 0 'False
ClipControls = 0 'False
Enabled = 0 'False
Height = 300
Index = 1
Left = 1230
ScaleHeight = 240
ScaleWidth = 1185
TabIndex = 1
TabStop = 0 'False
Top = 300
Width = 1245
End
Begin VB.PictureBox picLine
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
CausesValidation= 0 'False
ClipControls = 0 'False
Enabled = 0 'False
Height = 300
Index = 2
Left = 1230
ScaleHeight = 240
ScaleWidth = 1185
TabIndex = 2
TabStop = 0 'False
Top = 600
Width = 1245
End
Begin VB.PictureBox picLine
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
CausesValidation= 0 'False
ClipControls = 0 'False
Enabled = 0 'False
Height = 300
Index = 3
Left = 1230
ScaleHeight = 240
ScaleWidth = 1185
TabIndex = 3
TabStop = 0 'False
Top = 900
Width = 1245
End
Begin VB.PictureBox picLine
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
CausesValidation= 0 'False
ClipControls = 0 'False
Enabled = 0 'False
Height = 300
Index = 4
Left = 1230
ScaleHeight = 240
ScaleWidth = 1185
TabIndex = 4
TabStop = 0 'False
Top = 1200
Width = 1245
End
Begin VB.PictureBox picLine
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
CausesValidation= 0 'False
ClipControls = 0 'False
Enabled = 0 'False
Height = 300
Index = 5
Left = 1230
ScaleHeight = 240
ScaleWidth = 1185
TabIndex = 5
TabStop = 0 'False
Top = 1500
Width = 1245
End
Begin VB.PictureBox picLine
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
CausesValidation= 0 'False
ClipControls = 0 'False
Enabled = 0 'False
Height = 300
Index = 6
Left = 1230
ScaleHeight = 240
ScaleWidth = 1185
TabIndex = 6
TabStop = 0 'False
Top = 1800
Width = 1245
End
Begin VB.PictureBox picLine
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
CausesValidation= 0 'False
ClipControls = 0 'False
Enabled = 0 'False
Height = 300
Index = 7
Left = 1230
ScaleHeight = 240
ScaleWidth = 1185
TabIndex = 7
TabStop = 0 'False
Top = 2100
Width = 1245
End
End
Attribute VB_Name = "VWTrendLegend"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'Aufz<66>hlung f<>r Appearance
Public Enum EAppearance
apFlat = 0
ap3D = 1
End Enum
'Aufz<66>hlung f<>r Direction
Public Enum EOrientation
orHorizontal = 0
orVertical = 1
End Enum
Public Enum EPosition
poTrendName = 0
poLineStyle = 1
End Enum
'Ben<65>tigte VWS-Objekte:
Private WithEvents VWSLanguage As VWSLanguage
Attribute VWSLanguage.VB_VarHelpID = -1
'Eigenschaftsvariablen:
Private m_Appearance As EAppearance
Private m_Orientation As EOrientation
Private m_Pitch As Single
Private m_TrendControl As String
'Definition der ben<65>tigten Konstanten:
Private Const m_def_Appearance = ap3D
Private Const m_def_BackColor = &H8000000F
Private Const m_def_FontClass = ""
Private Const m_def_ForeColor = &H80000012
Private Const m_def_Orientation = orHorizontal
Private Const m_def_Pitch = 60
Private Const m_def_TrendControl = ""
Private Const m_def_Height = 675
Private Const m_def_Width = 8055
Private mTrend As Integer
Private mPosition As EPosition
'=======================================================================================
'<27>ffentliche Ereignisse
Public Event Click(Trend As Integer, Position As EPosition)
Attribute Click.VB_Description = "Tritt auf, wenn der Benutzer mit der Maus auf ein Objekt klickt."
Public Event DblClick(Trend As Integer, Position As EPosition)
Attribute DblClick.VB_Description = "Tritt auf, wenn der Benutzer mit der Maus auf ein Objekt doppelt klickt."
Public Event MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single, Trend As Integer, Position As EPosition)
Attribute MouseDown.VB_Description = "Tritt auf, wenn der Benutzer eine Maustaste <20>ber einem Objekt dr<64>ckt."
Public Event MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single, Trend As Integer, Position As EPosition)
Attribute MouseMove.VB_Description = "Tritt auf, wenn der Benutzer die Maus <20>ber einem Objekt bewegt."
Public Event MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single, Trend As Integer, Position As EPosition)
Attribute MouseUp.VB_Description = "Tritt auf, wenn der Benutzer eine Maustaste <20>ber einem Objekt losl<73>sst."
'=======================================================================================
'<27>ffentliche Eigenschaften
'Legt die Darstellung f<>r die Umrandungen fest (2D-Flat oder 3D)
Public Property Get Appearance() As EAppearance
Attribute Appearance.VB_Description = "Darstellungstyp f<>r das Objekt (3D-Effekt/flach)"
Attribute Appearance.VB_ProcData.VB_Invoke_Property = ";Darstellung"
Appearance = m_Appearance
End Property
Public Property Let Appearance(ByVal New_Appearance As EAppearance)
SetAppearance New_Appearance
PropertyChanged "Appearance"
End Property
'Legt die Hintergrundfarbe in der Namenanzeige fest;
'die Hintergrundfarbe f<>r die Liniendarstellunge kommt aus der BackColorTrend-Eigenschaft
'des <20>ber die TrendControl-Eigenschaft angebundenen VWTrend-Steuerelementes
Public Property Get BackColor() As OLE_COLOR
Attribute BackColor.VB_Description = "Hintergrundfarbe f<>r die Trendnamenanzeige. Die Hintergrundfarbe f<>r die Linien wird aus dem VWTrend-Steuerelement <20>bernommen."
Attribute BackColor.VB_ProcData.VB_Invoke_Property = ";Darstellung"
BackColor = idxName(0).BackColorOff
End Property
Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR)
SetBackColor New_BackColor
PropertyChanged "BackColor"
End Property
'Legt die Hintergrundfarbe in der Namenanzeige fest;
'die Hintergrundfarbe f<>r die Liniendarstellunge kommt aus der BackColorTrend-Eigenschaft
'des <20>ber die TrendControl-Eigenschaft angebundenen VWTrend-Steuerelementes
Public Property Get Enabled() As Boolean
Attribute Enabled.VB_Description = "Legt fest, ob das Objekt auf Mausereignisse reagieren soll."
Attribute Enabled.VB_ProcData.VB_Invoke_Property = ";Verhalten"
Enabled = UserControl.Enabled
End Property
Public Property Let Enabled(ByVal New_Enabled As Boolean)
UserControl.Enabled = New_Enabled
PropertyChanged "Enabled"
End Property
'Legt die Schriftart f<>r die Darstellung der Namen fest
Public Property Get Font() As Font
Attribute Font.VB_Description = "Schriftart"
Attribute Font.VB_ProcData.VB_Invoke_Property = ";Schriftart"
Set Font = idxName(0).Font
End Property
Public Property Set Font(ByVal New_Font As Font)
SetFont New_Font
PropertyChanged "Font"
End Property
'Legt die Fontklasse fest f<>r die Darstellung der Namen.
'Dies ist optional zur Font-Eigenschaft, dadurch wird aber bei der Sprachumschaltung
'auch der Font automatisch aus der Projektdatenbank geladen.
Public Property Get FontClass() As String
Attribute FontClass.VB_Description = "Fontklasse, <20>ber die die sprachumgeschaltete Schriftart bestimmt wird."
Attribute FontClass.VB_ProcData.VB_Invoke_Property = "PVWFontClass;Schriftart"
FontClass = idxName(0).FontClass
End Property
Public Property Let FontClass(ByVal New_FontClass As String)
SetFontClass New_FontClass
PropertyChanged "FontClass"
End Property
'Legt die Schriftfarbe f<>r die Darstellung der Namen fest.
Public Property Get ForeColor() As OLE_COLOR
Attribute ForeColor.VB_Description = "Schriftfarbe"
Attribute ForeColor.VB_ProcData.VB_Invoke_Property = ";Darstellung"
ForeColor = idxName(0).ForeColorOff
End Property
Public Property Let ForeColor(ByVal New_ForeColor As OLE_COLOR)
SetForeColor New_ForeColor
PropertyChanged "ForeColor"
End Property
'Legt die Ausrichtung fest:
' - orHorizontal: Namen nebeneinander, darunter die Linien
' - orVertical: Namen untereinander, daneben die Linien
Public Property Get Orientation() As EOrientation
Attribute Orientation.VB_Description = "Ausrichtung der Trendnamen und Linienstile"
Attribute Orientation.VB_ProcData.VB_Invoke_Property = ";Darstellung"
Orientation = m_Orientation
End Property
Public Property Let Orientation(ByVal New_Orientation As EOrientation)
m_Orientation = New_Orientation
PropertyChanged "Orientation"
UserControl_Resize 'Neuplatzierung der Objekte
End Property
'Legt die Teilung in % fest f<>r die Darstellung des Namens zur Darstellung der Linie
Public Property Get Pitch() As Single
Attribute Pitch.VB_Description = "Gr<47><72>enverh<72>ltnis der Namesanzeige zum gesamten Steuerelement in Prozent"
Attribute Pitch.VB_ProcData.VB_Invoke_Property = ";Darstellung"
Pitch = m_Pitch
End Property
Public Property Let Pitch(ByVal New_Pitch As Single)
m_Pitch = New_Pitch
PropertyChanged "Pitch"
UserControl_Resize 'Neuplatzierung der Objekte
End Property
'Legt das VWTrend-Steuerelement fest, zu dem dieses Steuerelement die Legende
'anzeigen soll; das VWTrend-Steuerelement befindet sich auf demselben Formular
Public Property Get TrendControl() As String
Attribute TrendControl.VB_Description = "Name des VWTrend-Steuerelements, zu dem die Legende angezeigt werden soll"
Attribute TrendControl.VB_ProcData.VB_Invoke_Property = "PVWTrendLegend;Verhalten"
TrendControl = m_TrendControl
End Property
Public Property Let TrendControl(ByVal New_TrendControl As String)
m_TrendControl = New_TrendControl
PropertyChanged "TrendControl"
TrendControlChanged 'Neuberechnung der anzuzeigenden Daten
End Property
'=======================================================================================
'<27>ffentliche Methoden
'Erzwingt eine Neuermittlung der Trenddaten vom VWTrend-Steuerelement.
'Muss von au<61>en aufgerufen werden, wenn im VWTrend-Steuerelement Eigenschaften
'ver<65>ndert werden.
Public Sub ApplyChanges()
Attribute ApplyChanges.VB_Description = "Liest die Informationen erneut von VWTrend-Steuerelement ein und zeigt sie an."
TrendControlChanged
End Sub
Private Sub UserControl_Click()
RaiseEvent Click(mTrend, mPosition)
End Sub
Private Sub UserControl_DblClick()
RaiseEvent DblClick(mTrend, mPosition)
End Sub
Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
CalcPosition x, y
RaiseEvent MouseDown(Button, Shift, x * Screen.TwipsPerPixelX, y * Screen.TwipsPerPixelY, mTrend, mPosition)
End Sub
Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
CalcPosition x, y
RaiseEvent MouseMove(Button, Shift, x * Screen.TwipsPerPixelX, y * Screen.TwipsPerPixelY, mTrend, mPosition)
End Sub
Private Sub UserControl_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
CalcPosition x, y
RaiseEvent MouseUp(Button, Shift, x * Screen.TwipsPerPixelX, y * Screen.TwipsPerPixelY, mTrend, mPosition)
End Sub
'=======================================================================================
'interne Ereignisse
'LanguageChange-Ereignis des VWSLanguage-Objektes:
Private Sub VWSLanguage_LanguageChange(ByVal NewLCID As Long)
'Die Sprache hat sich ge<67>ndert, also m<>ssen die Trendnamen neu ermittelt werden.
TrendControlChanged
End Sub
'Initialize Ereignis:
'Legt neues VWSLanguage-Objekt an
Private Sub UserControl_Initialize()
Set VWSLanguage = New VWSLanguage
End Sub
'Prozedur, welche die Resize- und die TrendControlChanged-Prozedur aufruft
Private Sub UserControl_Show()
UserControl_Resize
TrendControlChanged
End Sub
'UserControl wird in der Gr<47><72>e ge<67>ndert:
'Alle Elemente innerhalb des UserControls anpassen.
Private Sub UserControl_Resize()
Dim l As Long, sngDiv As Single
Dim i As Integer
'Achtung: Die ScaleMode-Eigenschaft des UserControls muss auf "3-Pixel" stehen!
'Hier wird mit Pixeln gerechnet, nicht mit Twips!
Select Case m_Orientation
Case orVertical
l = UserControl.ScaleHeight
Case orHorizontal
l = UserControl.ScaleWidth
End Select
If m_Appearance = apFlat Then
l = l + 7
End If
sngDiv = l / 8
For i = 0 To 7
Select Case m_Orientation
Case orVertical
idxName(i).Width = UserControl.ScaleWidth * m_Pitch / 100
idxName(i).Left = 0
picLine(i).Left = idxName(i).Width - IIf(m_Appearance = apFlat, 1, 0)
picLine(i).Width = UserControl.ScaleWidth - picLine(i).Left
idxName(i).Top = CLng(i * sngDiv) - IIf(m_Appearance = apFlat, i, 0)
picLine(i).Top = idxName(i).Top
Case orHorizontal
idxName(i).Height = UserControl.ScaleHeight * m_Pitch / 100
idxName(i).Top = 0
picLine(i).Top = idxName(i).Height - IIf(m_Appearance = apFlat, 1, 0)
picLine(i).Height = UserControl.ScaleHeight - picLine(i).Top
idxName(i).Left = CLng(i * sngDiv) - IIf(m_Appearance = apFlat, i, 0)
picLine(i).Left = idxName(i).Left
End Select
Next i
For i = 0 To 6
Select Case m_Orientation
Case orVertical
idxName(i).Height = idxName(i + 1).Top - idxName(i).Top + IIf(m_Appearance = apFlat, 1, 0)
picLine(i).Height = idxName(i).Height
Case orHorizontal
idxName(i).Width = idxName(i + 1).Left - idxName(i).Left + IIf(m_Appearance = apFlat, 1, 0)
picLine(i).Width = idxName(i).Width
End Select
Next i
Select Case m_Orientation
Case orVertical
idxName(7).Height = UserControl.ScaleHeight - idxName(7).Top
picLine(7).Height = idxName(7).Height
Case orHorizontal
idxName(7).Width = UserControl.ScaleWidth - idxName(7).Left
picLine(7).Width = idxName(7).Width
End Select
End Sub
'Beim Platzieren des Controls werden die Eigenschaften initialisiert.
Private Sub UserControl_InitProperties()
m_Appearance = m_def_Appearance
m_Orientation = m_def_Orientation
m_Pitch = m_def_Pitch
m_TrendControl = m_def_TrendControl
UserControl.Height = m_def_Height
UserControl.Width = m_def_Width
End Sub
'Beim Laden des Controls werden die eingestellten Eigenschaften gelesen.
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
SetAppearance PropBag.ReadProperty("Appearance", m_def_Appearance)
SetBackColor PropBag.ReadProperty("BackColor", m_def_BackColor)
UserControl.Enabled = PropBag.ReadProperty("Enabled", True)
SetFont PropBag.ReadProperty("Font", Ambient.Font)
SetFontClass PropBag.ReadProperty("FontClass", m_def_FontClass)
SetForeColor PropBag.ReadProperty("ForeColor", m_def_ForeColor)
m_Orientation = PropBag.ReadProperty("Orientation", m_def_Orientation)
m_Pitch = PropBag.ReadProperty("Pitch", m_def_Pitch)
m_TrendControl = PropBag.ReadProperty("TrendControl", m_def_TrendControl)
End Sub
'Speichern der Eigenschaften.
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("Appearance", m_Appearance, m_def_Appearance)
Call PropBag.WriteProperty("BackColor", idxName(0).BackColorOff, m_def_BackColor)
Call PropBag.WriteProperty("Enabled", UserControl.Enabled, True)
Call PropBag.WriteProperty("Font", idxName(0).Font, Ambient.Font)
Call PropBag.WriteProperty("FontClass", idxName(0).FontClass, m_def_FontClass)
Call PropBag.WriteProperty("ForeColor", idxName(0).ForeColorOff, m_def_ForeColor)
Call PropBag.WriteProperty("Orientation", m_Orientation, m_def_Orientation)
Call PropBag.WriteProperty("Pitch", m_Pitch, m_def_Pitch)
Call PropBag.WriteProperty("TrendControl", m_TrendControl, m_def_TrendControl)
End Sub
'=======================================================================================
'private Hilfsfunktionen
'Prozedur zur <20>bernahme der Trend-Eigenschaften in das UserControl:
'Schreibt den Laufzeinamen der Trends in die VWIndex und zeichnet Linien
'mit der zum Trend geh<65>renden Linienbreite und Linienfarbe in die Pictureboxen.
Private Sub TrendControlChanged()
Dim i As Integer
Dim s As String
Dim t As String
Dim ctr As Control
Dim tBrowser As New VWSTrendBrowser
Dim tProp As VWSTrendProperties
'Wenn die TrendControl-Eigenschaft nicht leer ist
If Len(m_TrendControl) = 0 Then
Exit Sub
End If
Set ctr = UserControl.Extender.Parent.Controls(m_TrendControl)
'Schleife zum Durchlaufen der Trends
For i = 0 To 7
'L<>schen der alten Eintr<74>ge und Linien
picLine(i).Cls
picLine(i).BackColor = ctr.BackColorTrend
idxName(i).TextOff = ""
'Wenn die TrendControl-Eigenschaft nicht leer ist
If m_TrendControl <> "" Then
'Ermitteln der Trend- und Archivnamen
'<27>ber die CallByName-Funktion
s = "Trend" & i + 1
t = "Archive" & i + 1
s = CallByName(ctr, s, VbGet)
t = CallByName(ctr, t, VbGet)
End If
'Wenn es einen Trend gibt
If s <> "" Then
'Setzen des VWSTrendProperties-Objektes
Set tProp = tBrowser.TrendInfo(t, s)
'Wenn tProp nicht leer ist(im Laufzeitmodus)
If Not tProp Is Nothing Then
idxName(i).TextOff = tProp.LocalizedName
Else
idxName(i).TextOff = s
End If
'Ermitteln der Einstellungen der Trends
'im TrendControl und zeichnen von
'entsprechenden Linien
s = "PenWidth" & i + 1
picLine(i).DrawWidth = CallByName(ctr, s, VbGet)
s = "ColorTrend" & i + 1
picLine(i).DrawMode = 13
picLine(i).Line (30, picLine(i).ScaleHeight / 2)-(picLine(i).ScaleWidth - 30, picLine(i).ScaleHeight / 2), CallByName(ctr, s, VbGet)
End If
Next i
End Sub
Private Sub SetBackColor(Color As OLE_COLOR)
Dim i As Integer
For i = 0 To 7
idxName(i).BackColorOff = Color
Next i
End Sub
Private Sub SetForeColor(Color As OLE_COLOR)
Dim i As Integer
For i = 0 To 7
idxName(i).ForeColorOff = Color
Next i
End Sub
Private Sub SetFont(Font As StdFont)
Dim i As Integer
For i = 0 To 7
Set idxName(i).Font = Font
Next i
End Sub
Private Sub SetFontClass(FontClass As String)
Dim i As Integer
For i = 0 To 7
idxName(i).FontClass = FontClass
Next i
End Sub
Private Sub SetAppearance(ByVal New_Appearance As EAppearance)
Dim i As Integer
m_Appearance = New_Appearance
For i = 0 To 7
If m_Appearance = apFlat Then
idxName(i).BorderStyle = 1
idxName(i).ShadowStyle = vwNone
Else
idxName(i).BorderStyle = 0
idxName(i).ShadowStyle = vwStandard
End If
picLine(i).Appearance = m_Appearance
Next i
UserControl_Resize
End Sub
Private Sub CalcPosition(ByVal x As Single, ByVal y As Single)
If m_Orientation = orHorizontal Then
mTrend = x / UserControl.ScaleWidth * 8 + 0.5
mPosition = IIf(y < m_Pitch * UserControl.ScaleHeight / 100, poTrendName, poLineStyle)
Else
mTrend = y / UserControl.ScaleHeight * 8 + 0.5
mPosition = IIf(x < m_Pitch * UserControl.ScaleWidth / 100, poTrendName, poLineStyle)
End If
If mTrend = 0 Then mTrend = 1
If mTrend = 9 Then mTrend = 8
End Sub
'=======================================================================================
'private Hilfsfunktionen
'Hilfsfunktion f<>r die PropertyPage zur Anzeige der Trend-Controls.
Friend Function Container() As Object
Set Container = UserControl.Extender.Parent
End Function