Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Grid lines color on ReportGrid Collapse All
Subject Author Date
Suhai Gyorgy Jul 30, 2007 - 8:48 AM

Dear Support,

I tried to change the color of the grid lines in my reportgrid by overriding OnGbwQueryGridLinesColor virtual method. But it never gets called. Even if I put a breakpoint in CExtGridBaseWnd::OnGbwQueryGridLinesColor(), it doesn’t step into that call (I checked if this method is overriden in any of your classes, but it doesn’t seem to be overriden).

If I’m not mistaken, the gridlines are drawn in CExtReportGridWnd::OnGbwPaintCell method, with the FillRect call in this part of code:

...
	if(		GridLinesHorzGet()
		&&	hTreeItem != NULL
		&&	nChildCount == 0L
		)
	{
		COLORREF clrFace = OnSiwGetSysColor( COLOR_3DFACE );
		dc.FillSolidRect(
			rcCell.left,
			rcCellExtra.bottom-1,
			rcCell.right - rcCell.left,
			1,
			clrFace
			);
	...
	}
...
I think clrFace should be taken from OnGbwQueryGridLinesColor, right? (It returns the same color in the default implementation.)

Thank you!

Technical Support Jul 30, 2007 - 10:30 AM

Yes, you are absolutely right. Please replace COLORREF clrFace = OnSiwGetSysColor( COLOR_3DFACE ); code with COLORREF clrFace = OnGbwQueryGridLinesColor(); in the ../Prof-UIS/Src/ExtReportGrid.cpp file.