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 » OnPaintText not being called Collapse All
Subject Author Date
Bob Sabiston Dec 27, 2006 - 12:00 PM

We have a class derived from CExtGridCell with an OnPaintText override implemented to provide custom text rendering inside the cell. Upon the upgrade to the Prof-UIS 2.62 release, we find that this override is not being called and nothing is being painted inside the window. Is there something we are missing in the initialization of the cell??
Thanks and have a Happy New Year.

Technical Support Dec 27, 2006 - 1:40 PM

The signature of the CExtGridCell::OnPaintText() method has not been changed. Could you insert your grid cell class into some grid in the SimpleGrids sample and send the modified code to us? We guess there must be something wrong with linking LIB files or a problem with include paths.

We wish you a Happy New Year too.

Bob Sabiston Jan 2, 2007 - 4:24 PM

Problem seemed to be that the OnPaintForeground was calling IsEmpty() for the cell before calling OnPaintText. My cell did not implement the IsEmpty call and was returning true. Solution was to MyCell::IsEmpty() {return false;}

Technical Support Jan 3, 2007 - 12:52 PM

We added a __EGCS_EX_EMPTY extended cell style in 2.62. When this style is applied, a cell is considered to be empty. The empty style is automatically removed when the user enters some value in the cell. The cell is empty by default, so if you are using a custom cell, you should either remove this style when the user changes the cell value or override the CExtGridCell::Empty() virtual method and return false.