Results 1 to 2 of 2

Thread: A useful tip about MSFlexGrid (and others?)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Sydney, Australia
    Posts
    196

    Post

    I have a small application (actually its just a driver for some code i want to test), and it uses a MSFlexGrid to display my results. So i add many lines to the grid and then loop through and colour-code the cells depending on their content.

    Anyway, my tip is that if you set the grid's .Visible property to false before you add or loop thru the grid colour-coding it, and then after you do this, set .Visible back to true, it is much much much quicker. In fact on my PII/350 here at work it seems almost instantaneous, compared to before when i could see each line being looped thru.

    Hope this helps someone. Perhaps you all knew this already. I'm not sure if it works with other grids, though i can't see why it wouldnt have the same effect,


  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Or better yet, you can use LockWindowUpdate API to stop any drawings om this control. And then reenabling it again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width