简体   繁体   English

TStatusBar控件中的模糊文本

[英]Blurred text in the TStatusBar control

I have for a very long time experienced a hugely annoying problem with the TStatusBar VCL control, a thin wrapper around the Win32 status bar control. 我很长一段时间都经历过TStatusBar VCL控件的一个非常恼人的问题,这是一个围绕Win32 状态栏控件的薄包装器。

Since this appears to me as a very common and frustrating issue, I am very surprised Google (and StackOverflow) doesn't seem to know much about it. 由于这在我看来是一个非常普遍和令人沮丧的问题,我很惊讶谷歌(和StackOverflow)似乎并不太了解它。

The problem is that the status bar text becomes very blurred when it hasn't changed for a while; 问题是当状态栏文本暂时没有改变时,它会变得非常模糊; the precise conditions are still unknown to me. 我仍然不知道确切的条件。 But I see this every day: 但我每天都看到这个:

模糊状态栏的屏幕截图

If one of the panels has its text updated, the new text is rendered correctly (see last panel): 如果其中一个面板更新了其文本,则会正确呈现新文本(请参阅上一个面板):

部分模糊状态栏的屏幕截图

Is this something that only happens when I am in the vicinity of running Delphi processes, or is it indeed a known issue? 这是否只有在我在运行Delphi流程附近时才会发生,或者它确实是一个已知问题? More importantly, is there a known cure? 更重要的是,有一种已知的治疗方法吗? (And, academically, why does this happen? It wouldn't surprise me if it is related to transparent drawing of anti-aliased text by code originally designed for unthemed Win9x.) (并且,在学术上,为什么会发生这种情况?如果它与最初为未经训练的Win9x设计的代码透明地绘制抗锯齿文本有关,我不会感到惊讶。)

I have tried to enable double-buffering, but I am not sure if that completely resolves the issue. 我试图启用双缓冲,但我不确定是否完全解决了这个问题。 (I have seen even worse behaviour in non-double-buffered list view controls, which is resolved by making them double-buffered.) (我在非双缓冲列表视图控件中看到了更糟糕的行为,通过使它们进行双缓冲来解决。)

I made all status bars in my applications double-buffered a week ago, and I haven't seen any blurred text in any of them since then. 我在一周前对我的应用程序中的所有状态栏进行了双重缓冲,从那以后我没有看到任何模糊文本。 Previously, I saw severely blurred text daily. 以前,我每天看到严重模糊的文字。 Hence, it seems like this issue - whatever is causing it - can be fixed by making the status bars double buffered. 因此,似乎这个问题 - 无论是什么导致它 - 可以通过使状态栏双缓冲来修复。

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

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