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 » Autofit column width in CExtGridWnd Collapse All
Subject Author Date
Vincent Wong Mar 9, 2007 - 7:59 AM

Hi,

Is it possible, programmatically, to autofit a particular column of a CExtGridWnd to its contents?

I can create the desired effect at runtime by manually double clicking on the line to the right of the top header cell for the column.

It would help if I could determine the width of the contents of a given cell.

Thanks,

Vincent.

Technical Support Mar 9, 2007 - 9:24 AM

You can do this with CExtGridWnd::BestFitColumn() and CExtGridWnd::BestFitRow().