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.

86 lines
2.2 KiB
Plaintext

VERSION 5.00
Begin VB.PropertyPage PVWTrend
Caption = "TrendControl"
ClientHeight = 3345
ClientLeft = 0
ClientTop = 0
ClientWidth = 5865
PaletteMode = 0 'Rasterbild
ScaleHeight = 3345
ScaleWidth = 5865
Begin VB.ListBox List1
Height = 2790
Left = 120
TabIndex = 1
Top = 420
Width = 5625
End
Begin VB.Label Label1
Caption = "Vorhandene VWTrend-Steuerelemente"
Height = 195
Left = 180
TabIndex = 0
Top = 180
Width = 4815
End
End
Attribute VB_Name = "PVWTrend"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Private Sub List1_Click()
Changed = True
End Sub
Private Sub PropertyPage_ApplyChanges()
Dim ctr As Object
'TrendControl-Eigenschaft der UserControls setzen
For Each ctr In SelectedControls
ctr.TrendControl = List1.List(List1.ListIndex)
Next ctr
End Sub
'Prozedur, welche alle auf der Form
'vorhandenen TrendControls in die Liste schreibt
Private Sub PropertyPage_SelectionChanged()
Dim uctr1 As VWTrendLegend
Dim uctr2 As VWTrendTime
Dim ctr As Control
Dim n As Integer
Dim Container As Object
Dim sTrend As String
On Error Resume Next
Select Case TypeName(SelectedControls(0))
Case "VWTrendLegend"
Set uctr1 = SelectedControls(0)
Set Container = uctr1.Container
sTrend = uctr1.TrendControl
Case "VWTrendTime"
Set uctr2 = SelectedControls(0)
Set Container = uctr2.Container
sTrend = uctr2.TrendControl
End Select
List1.Clear
'Schleife, die alle Controls des Containers (z.B. eines Formulars) durchläuft
For Each ctr In Container.Controls
'Wenn aktuelles Control vom Typ VWTrend ist
If TypeName(ctr) = "VWTrend" Then
List1.AddItem ctr.Name
If sTrend = ctr.Name Then
List1.ListIndex = List1.NewIndex
End If
End If
Next ctr
End Sub