Hi,
I've discovered that when I have a control which is fully docked on a UltraTabPageControl, if that control issues a parent.Invalidate, the UltraTabPageControl never gets a paint event.
When the control is not fully docked, it does get the event. I have tested this with the standard Windows tab control (and thus tab page) and it also does get the event.
I've posted a simple sample demonstrating the problem below.
Is this a bug, or by design ? Either way, is there a work-around ? I need to be able to paint a border around a fully docked control which is on a UltraTabPageControl.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load UltraButton1.Dock = DockStyle.Fill End Sub
Private Sub Control_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles UltraButton1.MouseDown sender.parent.Invalidate() End Sub
Private Sub Control_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles UltraTabPageControl1.Paint Dim gr As System.Drawing.Graphics = e.Graphics Dim myPen As System.Drawing.Pen myPen = New System.Drawing.Pen(Color.Red, 2) gr.DrawRectangle(myPen, UltraButton1.Left, UltraButton1.Top, UltraButton1.Width, UltraButton1.Height) End Sub
End Class