Professional UI Solutions
Site Map   /  Register


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 » Proportional sizing only takes effect after the grid is resized Collapse All
Subject Author Date
Jeff Mayo Apr 2, 2010 - 1:08 PM

When I call CExtGridWnd::BseModifyStyleEx with the __EGBS_BSE_EX_PROPORTIONAL_COLUMN_WIDTHS the column don’t resize until the control is resized. Is there a way to force the grid to resize the column using the new settings?

Jeff Mayo Apr 5, 2010 - 1:00 PM

The first suggestion fixed my problem.

Technical Support Apr 5, 2010 - 11:53 AM

The proportional column resizing works correctly only if the horizontal scrolling is completely disabled. This means you should specify the __ESIS_STH_NONE style (not the __ESIS_STH_ITEM or __ESIS_STH_PIXEL styles) using the SiwModifyStyle() API. Please also check you applied the __EGBS_BSE_EX_PROPORTIONAL_COLUMN_WIDTHS style using the BseModifyStyleEx() API and not any other API.

Technical Support Apr 5, 2010 - 5:15 AM

We suspect you may have forgotten to invoke the grid’s OnSwUpdateScrollBars() method at the end of the grid initialization code.

Jeff Mayo Apr 5, 2010 - 6:43 AM

Yes, I needed to add the call to OnSwUpdateScrollBars() to make the change take effect.