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 General Discussion » Autozie Column in CExtGridWnd Collapse All
Subject Author Date
Alfonso Bastias Mar 14, 2006 - 11:37 AM

I created a Grid using CExtGridWnd. I will like to autosize one column, the "new" width fit with the biggest element (cell) of the column.
Do you have function or style like that?
Did not find anything like that in HELP (Documentation).

Thanks

Technical Support Mar 15, 2006 - 11:50 AM

Th auto-size feature for columns and rows is supported in the CExtGridWnd class (please download the latest Prof-UIS 2.53 via ftp). In the ReportGrid sample (which is beta now), this is used for auto-sizing columns when the user double clicks header dividers. We have added the following grid styles and class methods for implementing this feature:

__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_OUTER
__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_INNER
__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_OUTER
__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_INNER
__EGBS_BSE_EX_DBLCLK_BEST_FIT_VISIBLE_ROWS
__EGBS_BSE_EX_DBLCLK_BEST_FIT_VISIBLE_COLUMNS
__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_MEASURE_OUTER
__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_MEASURE_INNER
__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_MEASURE_OUTER
__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_MEASURE_INNER
__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_MEASURE_ALL
__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_MEASURE_ALL
__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN
__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW
CExtGridCell::MeasureCell()
CExtGridCell::OnMeasureBestFitExtent()
CExtGridWnd::OnQueryBestFitActionEnabled()
CExtGridWnd::BestFitColumn()
CExtGridWnd::BestFitRow()
The last two methods of the CExtGridWnd class perform the best fit width/height adjustment and can be used programmatically.