fix depending controls crashing because of missing tag for datetimepicker
This commit is contained in:
@@ -284,14 +284,14 @@ Public Class ClassControls
|
||||
End Sub
|
||||
|
||||
Public Function AddTextBox(indexname As String, y As Integer, text As String, DataType As String) As TextBox
|
||||
Dim txt As New TextBox
|
||||
txt.Name = "txt" & indexname
|
||||
|
||||
txt.Size = New Size(260, 27)
|
||||
txt.Location = New Point(11, y)
|
||||
txt.Tag = New ControlMeta() With {
|
||||
.IndexName = indexname,
|
||||
.IndexType = DataType
|
||||
Dim txt As New TextBox With {
|
||||
.Name = "txt" & indexname,
|
||||
.Size = New Size(260, 27),
|
||||
.Location = New Point(11, y),
|
||||
.Tag = New ControlMeta() With {
|
||||
.IndexName = indexname,
|
||||
.IndexType = DataType
|
||||
}
|
||||
}
|
||||
|
||||
If text <> "" Then
|
||||
@@ -340,6 +340,27 @@ Public Class ClassControls
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function AddDateTimePicker(indexname As String, y As Integer, DataType As String)
|
||||
Dim dtp As New DateTimePicker With {
|
||||
.Name = "dtp" & indexname,
|
||||
.Format = DateTimePickerFormat.Short,
|
||||
.Size = New Size(133, 27),
|
||||
.Location = New Point(11, y),
|
||||
.Tag = New ControlMeta() With {
|
||||
.IndexName = indexname,
|
||||
.IndexType = DataType
|
||||
}
|
||||
}
|
||||
|
||||
AddHandler dtp.ValueChanged, AddressOf OndtpChanged
|
||||
|
||||
Return dtp
|
||||
End Function
|
||||
Sub OndtpChanged()
|
||||
'offen was hier zu tun ist
|
||||
End Sub
|
||||
|
||||
Private Sub PrepareDependingControl(Control As Control)
|
||||
If TypeOf Control Is Label Then
|
||||
Exit Sub
|
||||
|
||||
Reference in New Issue
Block a user