Public Class ClassControls_Manual
    Public Shared Function AddCheckBox(ID As Integer, indexname As String, y As Integer, vorbelegung As String, caption As String)
        Try
            Dim chk As New CheckBox
            chk.Name = "chk" & indexname
            chk.Size = New Size(100, 27)
            chk.Location = New Point(11, y)
            chk.Tag = ID
            If caption <> "" Then
                chk.Text = caption
                chk.Size = New Size(CInt(caption.Length * 15), 27)
            End If
            If vorbelegung <> "" Then
                If vorbelegung = "1" Or vorbelegung = "0" Then
                    chk.Checked = CBool(vorbelegung)
                Else
                    chk.Checked = False
                End If
            Else
                chk.Checked = False
            End If
            Return chk
        Catch ex As Exception
            LOGGER.Warn("Unhandled Exception in AddCheckBox: " & ex.Message)
            Return Nothing
        End Try

    End Function
End Class
