OpenNet.CF ButtonEx slower to draw than normal Button

  • Thread starter Thread starter David W
  • Start date Start date
D

David W

Hi

I have an app with a tab control with 3 pages, on each page is approx 20-25
buttons. Using the OpenNetCF ButtonEx takes at least twice as long to
draw(See each button drawing 1 at a time on screen) than the standard
Buttons(Marginal Flicker). Anyone know how I could speed this up or why this
is happening?

Also setting a background colour to each button will stop the other pages
from displaying the text or color. This will be something to do with the
graphics memory of some sort. Anyone know how to solve this problem?

Thank You

David W
 
If these issues are related to the ButtonEx painting then you will probably
need to modify the contents of the ButtonEx's OnPaint method to optimize it
for your applications needs. I would expect the ButtonEx to draw itself
slower than the CF's Button class as ButtonEx is being drawn entirely
through managed code where as the CF's Button wraps the native OS control.
You could try to scale the OnPaint method back to include only the calls
that are absolutely necessary in your situation. And if you think that it
might be related to memory you could try to draw the buttons direct and stop
them from double-buffering themselves into an of screen bitmap as they are
right now, just remember to call Dispose on any objects that you use. But I
haven't, personally, run into any drawing issues like the ones you have
mentioned with this control, however, I'll check it out when I get a chance.
 
Back
Top