Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl flashes continuously on cells with large content
ArrayCtrl flashes continuously on cells with large content [message #51192] |
Tue, 19 February 2019 12:42 |
Tom1
Messages: 1212 Registered: March 2007
|
Senior Contributor |
|
|
Hi,
I have noticed that ArrayCtrl flashes continuously on cells with large content when placing cursor on such cells to show the content. The display panel that looks like a large tool tip, gets WM_PAINT messages flowing continuously at 10 .. 20 ms interval. On some computers this is really hard to look at. The following code with can demonstrate the issue:
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class ArrayCtrlTest : public TopWindow {
ArrayCtrl array;
void OK(){ AcceptBreak(1); }
void Cancel(){ RejectBreak(0); }
public:
typedef ArrayCtrlTest CLASSNAME;
ArrayCtrlTest(){
WhenClose=THISBACK(Cancel); // Assign window exit button to Cancel
array.AddColumn("Column title 1");
array.AddColumn("Column title 2");
array.Add("Click here, no problem.","But then take your cursor here...\nto reveal the rest of this text. Surprisingly enough, this causes a continuous stream\nof WM_PAINT messages on Windows at an interval of roughly 10.. 20 ms.\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\nThese lines just stretch the area to possibly show the flashing due to continuous updating...");
Sizeable().MinimizeBox().MaximizeBox();
Add(array);
array.SizePos();
Title("ArrayCtrlTest");
}
};
GUI_APP_MAIN
{
ArrayCtrlTest test;
test.Execute();
}
Adding the following RLOG in Win32Wnd.cpp will catch the problem with message 15 being repeated:
LRESULT CALLBACK Ctrl::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
GuiLock __;
RLOG("Ctrl::WndProc(" << message << ")" << usecs());
if(sFinished)
return DefWindowProc(hWnd, message, wParam, lParam);
Best regards,
Tom
|
|
|
|
|
Goto Forum:
Current Time: Fri Apr 26 00:35:00 CEST 2024
Total time taken to generate the page: 0.04389 seconds
|