MS_25052016

This commit is contained in:
SchreiberM
2016-05-25 11:59:00 +02:00
parent 9f93268c98
commit 26bf6ea6aa
8 changed files with 189 additions and 68 deletions

View File

@@ -1642,6 +1642,61 @@ Public Class ClassControlBuilder
Me.AddToPanel(control)
End If
End Sub
Public Sub AddDataGridViewCheckable(id As Integer,
name As String,
x As Integer,
y As Integer,
vwidth As Integer,
vheight As Integer,
_new As Boolean,
read_only As Boolean,
required As Boolean,
columnTitle As String,
Optional parent As GroupBox = Nothing,
Optional _designMode As Boolean = False)
Dim control As New DevExpress.XtraGrid.GridControl
Dim gridview As New DevExpress.XtraGrid.Views.Grid.GridView
control.MainView = gridview
Dim defaultSize = New Size(200, 150)
Dim metadata As New ClassControlMetadata()
metadata.Id = id
metadata.Name = name
metadata.Required = required
control.Tag = metadata
control.Name = name
control.Parent = _master_panel
If _new And IsNothing(parent) Then
control.Location = Me.GetCursorPosition()
control.Size = defaultSize
ElseIf _new And Not IsNothing(parent) Then
Dim cursor = Me.GetCursorPosition()
control.Location = New Point(cursor.X - parent.Location.X,
cursor.Y - parent.Location.Y)
Else
control.Location = New Point(x, y)
control.Size = New Size(vwidth, vheight)
End If
If _designMode = True Then
control.Cursor = Cursors.Hand
End If
Me.SetEventHandlers(control)
Me.CurrentControl = DirectCast(control, DevExpress.XtraGrid.GridControl)
If Not IsNothing(parent) Then
control.Parent = parent
Me.AddToGroupBox(parent, control)
Else
control.Parent = _master_panel
Me.AddToPanel(control)
End If
End Sub
Public Sub AddPictureBox(id As Integer,
name As String,
x As Integer,