Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
Tom1
Messages: 658
Registered: March 2007
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
Re: ArrayCtrl flashes continuously on cells with large content [message #51275 is a reply to message #51192] Thu, 28 February 2019 11:47 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
Hopefully fixed. Also hopefully this fix would not cause errors elsewhere Smile

Mirek
Re: ArrayCtrl flashes continuously on cells with large content [message #51276 is a reply to message #51275] Thu, 28 February 2019 12:03 Go to previous message
Tom1
Messages: 658
Registered: March 2007
Contributor
Hi Mirek,

Thanks! It looks all good now!

Best regards,

Tom
Previous Topic: GridCtrl - Get() with sorted rows
Next Topic: Please Remove BUG in DataGrid
Goto Forum:
  


Current Time: Wed Nov 13 11:02:52 CET 2019

Total time taken to generate the page: 0.02028 seconds