Hi,
Re-posting this as the formatting on the other post is terrible.
If I inherit from a control with the following OnPaint override and draw in
the DoPaint method then i get odd UI results when a combobox is dropped down
on top of the control and then removed. I use this code in CE as well where
the problem is greater due to the loading circle and the volume control boxes
that pop-up.
This problem is reproducible on the desktop though. A full example is posted
afterwards for you to copy -paste and see the issue yourself.
Any help would be appreciated as the code looks fine to me (am I an idiot?)
protected override void OnPaint(PaintEv entArgs e)
{
if (e.ClipRectangl e.Width 0 && e.ClipRectangle .Height 0)
{
using (m_BackBuffer = new Bitmap(e.ClipRe ctangle.Width,
e.ClipRectangle .Height))
{
using (m_BackGraphics = Graphics.FromIm age(m_BackBuffe r))
{
DoPaint(new PaintEventArgs( m_BackGraphics, e.ClipRectangle ));
}
e.Graphics.Draw Image(m_BackBuf fer, 0, 0);
}
}
}
-------
Full example: http://www.nomorepasting.com/getpaste.php?pasteid=16435
(posted elsewhere to prevent the replies from getting too long)
Re-posting this as the formatting on the other post is terrible.
If I inherit from a control with the following OnPaint override and draw in
the DoPaint method then i get odd UI results when a combobox is dropped down
on top of the control and then removed. I use this code in CE as well where
the problem is greater due to the loading circle and the volume control boxes
that pop-up.
This problem is reproducible on the desktop though. A full example is posted
afterwards for you to copy -paste and see the issue yourself.
Any help would be appreciated as the code looks fine to me (am I an idiot?)
protected override void OnPaint(PaintEv entArgs e)
{
if (e.ClipRectangl e.Width 0 && e.ClipRectangle .Height 0)
{
using (m_BackBuffer = new Bitmap(e.ClipRe ctangle.Width,
e.ClipRectangle .Height))
{
using (m_BackGraphics = Graphics.FromIm age(m_BackBuffe r))
{
DoPaint(new PaintEventArgs( m_BackGraphics, e.ClipRectangle ));
}
e.Graphics.Draw Image(m_BackBuf fer, 0, 0);
}
}
}
-------
Full example: http://www.nomorepasting.com/getpaste.php?pasteid=16435
(posted elsewhere to prevent the replies from getting too long)
Comment