locked
Why is refreshing on scrolling so slow!? RRS feed

  • Question

  • So here's a question about windows forms in general.

    Why is it that when I scroll a control, using the built-in auto-scroll feature, I can watch the form redrawing itself. When I scroll something like IE, I can still read the text on the screen, but when I scroll a form I cannot.

    Is this just an inherent weakness in windows forms, that it is ungodly slow? Or is it something that I'm doing / failing to do?
    Tuesday, December 13, 2005 7:42 PM

All replies

  • Could you be more specific as to what portion of the drawing is so slow? Can you post some code that performs really bad on your machine?
    Wednesday, December 14, 2005 10:45 AM
  • Specifically what is slow is the display of labels in a TableLayoutPanel.

    As for what code performs poorly, I'd have to work on that. I'm reworking some legacy code and I can't easily abstract a good section for you to see. Here's the general structure though:

    Form - no-auto-scroll
    --Panel - auto-scroll
    ---TableLayoutPanel - 2 Columns, 15 rows (this one scrolls fairly smoothly, but still not great)
    ---TableLayoutPanel - 10 Columns, 50 rows (The labels here streak verticall across the entire screen as you scroll up and down)

    I'll see what I can do about gutting some code for examples. But I'm not doing any processing onscroll.
    Wednesday, December 14, 2005 2:49 PM