fix highlighter
This commit is contained in:
@@ -320,24 +320,26 @@ Public Class Highlighter
|
||||
Private Sub UpdateHighlightPanelBounds()
|
||||
Dim bounds As Rectangle = New Rectangle(0, 0, _ContainerControl.ClientRectangle.Width, _ContainerControl.ClientRectangle.Height)
|
||||
|
||||
If TypeOf _HighlightPanel.Parent Is Form Then
|
||||
Dim form As Form = TryCast(_HighlightPanel.Parent, Form)
|
||||
If _HighlightPanel IsNot Nothing Then
|
||||
If TypeOf _HighlightPanel.Parent Is Form Then
|
||||
Dim form As Form = TryCast(_HighlightPanel.Parent, Form)
|
||||
|
||||
If form.AutoSize Then
|
||||
bounds.X += form.Padding.Left
|
||||
bounds.Y += form.Padding.Top
|
||||
bounds.Width -= form.Padding.Horizontal
|
||||
bounds.Height -= form.Padding.Vertical
|
||||
If form.AutoSize Then
|
||||
bounds.X += form.Padding.Left
|
||||
bounds.Y += form.Padding.Top
|
||||
bounds.Width -= form.Padding.Horizontal
|
||||
bounds.Height -= form.Padding.Vertical
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If _HighlightPanel.Bounds.Equals(bounds) Then
|
||||
_HighlightPanel.UpdateRegion()
|
||||
Else
|
||||
_HighlightPanel.Bounds = bounds
|
||||
End If
|
||||
If _HighlightPanel.Bounds.Equals(bounds) Then
|
||||
_HighlightPanel.UpdateRegion()
|
||||
Else
|
||||
_HighlightPanel.Bounds = bounds
|
||||
End If
|
||||
|
||||
_HighlightPanel.BringToFront()
|
||||
_HighlightPanel.BringToFront()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private _DelayTimer As Timer = Nothing
|
||||
@@ -386,17 +388,6 @@ Public Class Highlighter
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Function CanExtend(ByVal extendee As Object) As Boolean
|
||||
Return (TypeOf extendee Is Control)
|
||||
End Function
|
||||
|
||||
Private Sub SetError(ByVal control As Control, ByVal value As String)
|
||||
Me.SetHighlightColor(control, eHighlightColor.Red)
|
||||
End Sub
|
||||
|
||||
Private Sub ClearError(ByVal control As Control)
|
||||
Me.SetHighlightColor(control, eHighlightColor.None)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public Enum eHighlightColor
|
||||
|
||||
Reference in New Issue
Block a user