background color

This commit is contained in:
Jonathan Jenne
2019-10-17 14:19:28 +02:00
parent 037b7c6748
commit 8004ce4ffd
3 changed files with 56 additions and 29 deletions

View File

@@ -437,26 +437,32 @@ Public Class frmFormDesigner
End Function
Sub SetActiveControlColor()
CurrentControl.BackColor = Color.DarkOrange
If DirectCast(CurrentControl.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
CurrentControl.BackColor = Color.DarkOrange
End If
' Reset Color of all other controls
For Each inctrl As Control In Me.pnldesigner.Controls
If inctrl.Name <> CurrentControl.Name Then
Dim Type As String = inctrl.GetType.ToString
Select Case Type
Case "System.Windows.Forms.TextBox"
inctrl.BackColor = Color.White
Case "System.Windows.Forms.ComboBox"
inctrl.BackColor = Color.White
Case "System.Windows.Forms.Label"
inctrl.BackColor = Color.Transparent
Case "System.Windows.Forms.CheckBox"
inctrl.BackColor = Color.Transparent
Case "DD_PM_WINDREAM.ClassControlCreator+LineLabel"
inctrl.BackColor = inctrl.ForeColor
Case "DigitalData.Controls.LookupGrid.LookupControl2"
inctrl.BackColor = Color.White
End Select
For Each oControl As Control In Me.pnldesigner.Controls
If oControl.Name <> CurrentControl.Name Then
Dim oMetadata = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata)
If oMetadata.ReadOnly = False Then
Dim Type As String = oControl.GetType.ToString
Select Case Type
Case "System.Windows.Forms.TextBox"
oControl.BackColor = Color.White
Case "System.Windows.Forms.ComboBox"
oControl.BackColor = Color.White
Case "System.Windows.Forms.Label"
oControl.BackColor = Color.Transparent
Case "System.Windows.Forms.CheckBox"
oControl.BackColor = Color.Transparent
Case "DD_PM_WINDREAM.ClassControlCreator+LineLabel"
oControl.BackColor = oControl.ForeColor
Case "DigitalData.Controls.LookupGrid.LookupControl2"
oControl.BackColor = Color.White
End Select
End If
End If
Next
End Sub