jj: add line control
This commit is contained in:
@@ -180,7 +180,7 @@ Public Class ClassControlBuilder
|
||||
control.BackColor = Color.White
|
||||
control.ForeColor = Color.Black
|
||||
ElseIf control.ReadOnly = True Then
|
||||
control.BackColor = System.Drawing.SystemColors.Info
|
||||
control.BackColor = SystemColors.Info
|
||||
control.ForeColor = Color.Black 'System.Drawing.SystemColors.InfoText
|
||||
End If
|
||||
End Sub
|
||||
@@ -1480,8 +1480,8 @@ Public Class ClassControlBuilder
|
||||
End If
|
||||
End If
|
||||
|
||||
Me.SetEventHandlers(control)
|
||||
Me.CurrentControl = DirectCast(control, Label)
|
||||
SetEventHandlers(control)
|
||||
CurrentControl = control
|
||||
|
||||
If Not IsNothing(parent) Then
|
||||
control.Parent = parent
|
||||
@@ -1497,6 +1497,37 @@ Public Class ClassControlBuilder
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub AddLine(id As Integer,
|
||||
name As String,
|
||||
x As Integer,
|
||||
y As Integer,
|
||||
color As Integer,
|
||||
width As Integer,
|
||||
height As Integer,
|
||||
_new As Integer,
|
||||
Optional parent As GroupBox = Nothing,
|
||||
Optional _designMode As Boolean = False)
|
||||
Dim line As New LineLabel
|
||||
line.Tag = New ClassControlMetadata() With {
|
||||
.Id = id,
|
||||
.Name = name
|
||||
}
|
||||
line.Name = name
|
||||
|
||||
If _new Then
|
||||
line.Location = GetCursorPosition()
|
||||
line.Size = New Size(200, 5)
|
||||
Else
|
||||
line.Location = New Point(x, y)
|
||||
line.Size = New Size(width, height)
|
||||
End If
|
||||
|
||||
CurrentControl = line
|
||||
|
||||
line.Parent = _master_panel
|
||||
AddToPanel(line)
|
||||
End Sub
|
||||
|
||||
Public Sub AddTextBox(id As Integer,
|
||||
name As String,
|
||||
x As Integer,
|
||||
@@ -2583,4 +2614,8 @@ Public Class ClassControlBuilder
|
||||
MsgBox("Error in AddListBox: " + vbNewLine + ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Class LineLabel
|
||||
Inherits Label
|
||||
End Class
|
||||
End Class
|
||||
Reference in New Issue
Block a user