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 » Changing properties of the PreviewArea Collapse All
Subject Author Date
david klenowski Jun 10, 2007 - 2:42 AM

Hi Support,

Is it possible to change the font and enable word wrap for a preview area (a preview area with a RUNTIME_CLASS of CExtGridCellStringDM).

For the word wrap, I tried some commented out code in your ReportGrid sample (ChildView.cpp) but it failed with an assertion error ..
//        pCell = pRGI->PreviewAreaGet( RUNTIME_CLASS(CExtGridCellStringDM) );
//        ASSERT_VALID( pCell );
//        pCell->ModifyStyle( __EGCS_TEXT_ELLIPSIS );
//        //pCell->ModifyStyleEx( __EGCS_EX_WRAP_TEXT ); <-- THIS LINE CAUSES AN ASSERTION ERROR ..
//        pCell->TextSet(
//            _T("Preview area text goes here")
//            //_T("\r\n")
//            //_T("Preview area text goes here")
//            );

Similarly, is it possible to make the text within a preview area italic ? I have tried FontWeightSet(), FontIndexSet() but neither worked?

Thanks in advance .

dave

Technical Support Jun 11, 2007 - 3:29 AM

We already fixed the issue with multiline text in the preview area so you can download the update from our ftp server (please contact us for details).

The CExtGridCellStringDM class does not support font effects. The font effects are provided by the CExtGCF template and the CExtGridCellEx class based on it. The CExtGridCellStringDM class is derived from the CExtGridCell class - not from the CExtGridCellEx class. The CExtGridCellStringDM class is designed for memory grids with large text cell number. This class uses an effective memory allocation mechanism based on the data provider inside the grid control. If you need font effects:

1) Use CExtGridCellString instead of CExtGridCellStringDM.

2) Create and use a custom grid cell derived from the CExtGCF < CExtGridCellStringDM > template based type.