Grid: Keeping conjoint column width the same as grid width

Started by autocart, May 25, 2012, 12:14:55 AM

Previous topic - Next topic

autocart

Hi,

I have a grid inside a palette and 2 columns inside the grid. The column widths are sized so that they fill out the width of the grid accurately. I would like for the conjoint width of both columns to always stay exactly the same as the actual width of the grid itself. However ...

... when I resize the width of the first column then the width of the second column stays the same and therefore the conjoint width of both columns then differs from the width of the grid itself. I tried to change the 2nd columns width programatically by way of events.

Unfortunately there are no column resize events and none of the mouse-events fire when the mouse is exactly over the divider of the column-headers (which is the place where I resize the first column). I am now using a workaround by using the OnMouseMove event of the grid. The bad part about it is that - for the desired effect - I have to move the mouse AFTER resizing the column AND the OnMouseMove event does NOT fire when I move the mouse over the header of the grid-column. Therefore it can easily be that the user moves the mouse from the header (where the resizing takes place) to the top off the grid without the OnMouseMove event having fired at all.

Does anybody have a better idea of how to keep the conjoint column widths exactly the size of the grid-width itself? Thx!!