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 » Grid column width question Collapse All
Subject Author Date
Offer Har Feb 18, 2008 - 6:22 PM

Dear Support,

I have a 2 columns grid.
I would like that the second column will always cover the rest of the grid, while the first column size will not change:
1) When creating the grid, I will set the width of the first column, and the second will automatically will cover the remaining width.
2) When the grid size changes, the second column width will change to cover the size of the grid - the column will become wider or narrower according to the new size.
3) When the user resizes the first column, the second column with adjust accordingly
4) The user will not be able to resize the second column.
5) When there is a need for a vertical scroll-bar the second column will adjust automatically so there will not be a horizontal scroll-bar.

Is there a built-in mechanism for that? If not, what are the steps I need to take to make this requirement?

Thanks,
Ron.

Technical Support Mar 5, 2008 - 1:09 PM

You should use ExtentPercentSet(). Here is a related topic.

Offer Har Mar 3, 2008 - 6:38 AM

Dear Support,

Can you please explain how to implement this?

Thanks,
Ron.

Offer Har Feb 25, 2008 - 7:34 AM

What do you mean? can you give me a concrete example?
How do I make sure the first column’s width if fixed, but the user can change it’s width? what API calls do I need to do?

Technical Support Feb 25, 2008 - 4:59 AM

This window can be implemented as several proportionally resized columns. You should simply set some equal proportional extents to all columns rather than minimum/maximum pixel extents.

Offer Har Feb 22, 2008 - 8:11 PM

A would like to add that I want the columns to behave like the Watch grid in VS2005.

Offer Har Feb 22, 2008 - 5:59 PM

Dear Support,

I have a problem with your solution - it was rejected by our uses:
I must enable the user to modify the width of the columns -
When the user changes the width of the first column, the width of the second column should change accordingly (Item 3 in my original mail)
Please explain how I can this be implemented.

Thanks,
Ron.

Offer Har Feb 21, 2008 - 11:32 AM

There is one small annoyance though, it you can solve this, it would be even better:
In the second column, there is a the column separator line on the right, even though he is the last column, and there is nothing after it...
I will send you a picture with this.

Offer Har Feb 21, 2008 - 11:31 AM

Cool...
Thanks!

Technical Support Feb 21, 2008 - 6:57 AM

You should create a grid window which does not use horizontal scrolling at all. I.e. __ESIS_STH_NONE should be used instead of __ESIS_STH_PIXEL or __ESIS_STH_ITEM. The next step is to apply the __EGBS_BSE_EX_PROPORTIONAL_COLUMN_WIDTHS style that stretches all the columns proportionally across the entire grid. Finally, for the first column set the minimum, maximum and current pixel widths to an equal value by using the CExtGridCell::ExtentSet() method of the header cell belonging to the first column.