This commit is contained in:
2020-09-01 14:46:50 +02:00
parent d96882ce77
commit 50b3bc8d9e
6 changed files with 413 additions and 283 deletions

View File

@@ -126,28 +126,18 @@ Public Class ClassControlCreator
Logger = My.LogConfig.GetLogger()
End Sub
Public Function CreateExistingDataGridView(row As DataRow, pXPosition As Integer, pYPosition As Integer) As DataGridView
Dim oDataGridView As DataGridView = CreateBaseControl(New DataGridView(), row, pXPosition, pYPosition)
Public Function CreateExistingCheckbox(pAttributeRow As DataRow, pXPosition As Integer, pYPosition As Integer) As CheckBox
Dim oCheckBox As CheckBox = CType(CreateBaseControl(New CheckBox(), pAttributeRow, pXPosition, pYPosition), CheckBox)
oDataGridView.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT_GRIDVIEW)
oDataGridView.AllowUserToAddRows = False
oDataGridView.AllowUserToDeleteRows = False
oDataGridView.AllowUserToResizeColumns = False
oDataGridView.AllowUserToResizeRows = False
oDataGridView.AlternatingRowsDefaultCellStyle.BackColor = Color.Aqua
oCheckBox.AutoSize = True
Try
oCheckBox.Text = pAttributeRow.Item("ATTRIBUTE_TITLE")
Catch ex As Exception
oCheckBox.Text = "NO CAPTION AVAILABLE"
End Try
oCheckBox.CheckState = CheckState.Indeterminate
Dim col As New DataGridViewTextBoxColumn
col.HeaderText = ""
col.Name = "column1"
col.Width = oDataGridView.Width - 30
oDataGridView.Columns.Add(col)
'If Not designMode Then
' control.Enabled = Not row.Item("READ_ONLY")
' control.TabStop = Not row.Item("READ_ONLY")
'End If
Return oDataGridView
Return oCheckBox
End Function
Public Function CreateExistingDatepicker(pAttributeRow As DataRow, pXPosition As Integer, pYPosition As Integer) As DateEdit
Dim oDateControl As DateEdit = CType(CreateBaseControl(New DateEdit(), pAttributeRow, pXPosition, pYPosition), DateEdit)
@@ -191,8 +181,7 @@ Public Class ClassControlCreator
oView.OptionsView.NewItemRowPosition = NewItemRowPosition.None
oView.OptionsView.ShowAutoFilterRow = True
oView.OptionsView.EnableAppearanceEvenRow = True
oMyNewGridControl.Size = New Size(DEFAULT_WIDTH_GRIDVIEW, DEFAULT_HEIGHT_GRIDVIEW)
oMyNewGridControl.Size = New Size(CInt(pAttributeRow.Item("WIDTH")), CInt(pAttributeRow.Item("HEIGHT")))
' Add and configure navigator to delete rows
oMyNewGridControl.UseEmbeddedNavigator = True