Pergunta

In Stringray grid, there is the ability to use a transparent background which allows the background of the dialog to be shown through the grid.

In the documentation it states:

But be careful; you should disable scrolling or you have to redraw the grid each time it is scrolled (by overriding DoScroll).

I have a scrollable gird and override the DoScroll and make sure I call Redraw and also tried Invalidate, however the grid is still not completely erasing and redrawing.

I also tried using the old drawing method by setting m_bForceOldDrawing to TRUE.

How can I create a grid that has a transparent background that paint correctly after a scroll without leaving artifacts?

Foi útil?

Solução

Yes you have to redraw the grid by overriding DoScroll because it is no longer using ScrollWindow to scroll contents because the background is transparent.

However you now have artifacts of the grid over your background.

This is because the background behind the grid is not getting redrawn.

Do you have clipchildren set for the parent?

Another potential problem is that the background is not being drawn because it doesn't realize it has been exposed.

Try calling the parent with the following.

Parent.Invalidate(); Parent.UpdateWindow();

before calling...

Invalidate();

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top