开发者

Double Buffer a custom control in the Compact Framework

I have a custom control that inherits from Panel. I end up putting several DataGrids and Labels on this panel. When it gets too long it auto scrolls for me.

I really need the scrolling because it is a list of scanned in objects that will grow larger than the space on the screen will allow.

But when I scroll it flickers quite a lot. I would love to have it give me some smooth scrolling.

I have seen several "Compact Frame开发者_开发问答work" double buffer examples out there, but they all are double buffering draw methods (ie graphics.DrawString). My custom control does not do any painting by itself. It just puts normal grids and labels on the panel and lets the panel paint them.

Is there a way to double buffer normal controls (again NOT custom painting)?


The Compact Framework Controls do not have the DoubleBuffered property or the underlying double-buffering mechanism. There's no way to add it either.

The only way to get double-buffering is to override the painting of the control and do your own.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜