10179 : How do I retrieve the current width of a column?

Question

The user can change the columns width of the grid and my application must remember that and to restore it when the user open the project again. I am using the property Width:

                ph.GridColumn(0).Width

But it does not work, always it returns the initial width, not the modified

How do I retrieve the current width of a column?

Answer

To get to the current runtime width you must use this call:

Gantt.GridColumnGet(index: Integer; var title, editkind, Width, SortEnable: OleVariant);

Send in variant variables and they will get the value for the Title, the editkind, the current runtime width and if the Sortenable was set or not..

Leave a Reply