DrawGrid keeps jumping back to top

I have a Drawgrid in a ScrollBox control.

Sometimes, when I click on the Drawgrid (while a lower part of it is visible) it automatically repositions the Scrollbox scrollbar position to the top (so that the top row of DrawGrid is back in view).

I've noticed that Drawgrid does this whether or not it is in a ScrollBox. Sometimes, when working on an individual grid further down the Drawgrid (ie, having just placed a picture in it), the Drawgrid repostions itself so I can see the top row again.

I'm using OnDrawCell. Is there some kind of automatic repositioning of DrawGrid ? And can I stop it happening ?


Comments

  • : I have a Drawgrid in a ScrollBox control.
    :
    : Sometimes, when I click on the Drawgrid (while a lower part of it is visible) it automatically repositions the Scrollbox scrollbar position to the top (so that the top row of DrawGrid is back in view).
    :
    : I've noticed that Drawgrid does this whether or not it is in a ScrollBox. Sometimes, when working on an individual grid further down the Drawgrid (ie, having just placed a picture in it), the Drawgrid repostions itself so I can see the top row again.
    :
    : I'm using OnDrawCell. Is there some kind of automatic repositioning of DrawGrid ? And can I stop it happening ?
    :
    :
    :
    Oh boy ....this is now super-duper desperate......

    I've spent hours trying everything.....
    basically, I have a drawgrid that is magnified bigger than the visible screen.

    I placed it in a scrollbox ....

    but when I click on one of the lower cells, the whole thing jumps back up to redisplay the top line of the drawgrid. Basically, it is refreshing the whole drawgrid, even though I have default drawing set to False.

    Its as if the cells are being 'Invalidated'.....and they are not supposed to be unless I call a routing to say so.

    COnsequently, I wonder if I have discovered a bug in Delphi 6 ?

    can anyone comment ?

    yours, in desperation...
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion