简体   繁体   English

Stringray网格透明背景

[英]Stringray Grid transparent background

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. Stringray网格中 ,可以使用透明背景,从而可以通过网格显示对话框的背景。

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 ). 您应该禁用滚动,或者每次滚动时都必须重新绘制网格(通过重写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. 我有一个可滚动的网格并覆盖DoScroll ,并确保我调用Redraw并尝试了Invalidate ,但是网格仍然没有完全擦除和重绘。

I also tried using the old drawing method by setting m_bForceOldDrawing to TRUE . 我还尝试通过将m_bForceOldDrawing设置为TRUE来使用旧的绘制方法。

How can I create a grid that has a transparent background that paint correctly after a scroll without leaving artifacts? 如何创建具有透明背景的网格,在滚动后可以正确绘制而不会留下伪像?

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. 是的,您必须通过覆盖DoScroll来重绘网格,因为它不再使用ScrollWindow滚动内容,因为背景是透明的。

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.Invalidate(); Parent.UpdateWindow(); Parent.UpdateWindow();

before calling... 打电话之前...

Invalidate(); Invalidate();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM