I would like to draw a line on the middle of a Krypton Toolkit Panel control but the line is not drawn.
I've tried both soultions here: draw line on panel not showing up
And this:
Public Class Form1
Private Sub KryptonPanel1_Paint(sender As Object, e As PaintEventArgs) _
Handles KryptonPanel1.Paint
Using p As New Pen(Brushes.YellowGreen)
e.Graphics.DrawLine(p, sender.Width \ 2, 0, sender.Width \ 2, sender.Bottom)
End Using
End Sub
End Class
At this point, I think it's safe to conclude that the
Krypton Toolkit Panel
do not have the control styleUserPaint
.If possible, you can try one of the following options.
Start by creating a custom control derived from
Krypton Toolkit Panel
.Option 1
Append the flag in the constructor. (This will probably break the custom drawings in base class)
Option 2
Override
WndProc
.