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 » Problem in V2.70 and CExtGridWnd Collapse All
Subject Author Date
Offer Har May 19, 2007 - 5:51 AM

Dear Support,

I have upgraded from 2.62 to 2.70
I have an application using CExtPaintManagerOffice2007_Silver, and in it there is a CExtGridWnd with cells types of CExtGridCellString.
In version 2.62 all was fine.
In version 2.70 the all the cells color is light gray, and because it’s on white, the text is unreadable.

Please verify and rectify...
Thanks,
Ron.

Offer Har May 19, 2007 - 5:58 AM

Dear Support,

I found out that this behavior only happens if you attach the read only attribute to the cell.
I think that this is a mistake, even if it was intentionally, you cannot read the content of the cell, and I think you should not touch the color of the cell even if it is read-only.

Regards,
Ron.

Technical Support May 21, 2007 - 9:08 AM

Thank you for reporting the problem. Here is how you can fix this.

1) Find the following code at the end of CExtGridCell::OnQueryTextColor()

if( clrText == COLORREF(-1L) )
{
      if( ( GetStyle() & __EGCS_READ_ONLY ) != 0 )
      {
            clrText = wndGrid.OnSiwGetSysColor( COLOR_3DFACE );
            return clrText;
      } // if( ( GetStyle() & __EGCS_READ_ONLY ) != 0 )
} // if( clrText == COLORREF(-1L) )
2) Replace it with the code below
if( clrText == COLORREF(-1L) )
{
      if( ( GetStyle() & __EGCS_READ_ONLY ) != 0 )
      {
            clrText = wndGrid.OnSiwGetReadOnlyTextColor();
            return clrText;
      } // if( ( GetStyle() & __EGCS_READ_ONLY ) != 0 )
} // if( clrText == COLORREF(-1L) )
3) Add a new OnSiwGetReadOnlyTextColor() virtual method to the CExtScrollItemWnd and CExtPropertyGridWnd classes:
COLORREF CExtScrollItemWnd::OnSiwGetReadOnlyTextColor() const
{
      ASSERT_VALID( this );
      return OnSiwGetSysColor( COLOR_BTNTEXT );
}

COLORREF CExtPropertyGridWnd::OnSiwGetReadOnlyTextColor() const
{
      ASSERT_VALID( this );
      return OnSiwGetSysColor( COLOR_3DFACE );
}