Re: EuGrid Column Spacing
- Posted by "C. K. Lester" <cklester at yahoo.com> Mar 27, 2003
- 362 views
> > 1. Get the current size of the grid using GetClientRect(grid) > > 2. The available width for columns (in pixels) is grid width minus the > > width of the row header, which can be obtained from: > > 3. Calculate 30% of the available width and set first column width: > > EGW_SetColumnProperty( grid, col1, EGW_COL_WIDTH, width ) > > 4. Set second column to remaining available width > > > > If you get stuck then let me know and I will see if I can throw an > > example together. > > And I just throw this into the w32HChange event of the grid itself, right? Got it working great! Even almost perfect! (It's in the w32HResize event...) The only problem is, when the width decreases, the columns fill the space completely. When it increases, sometimes there is a gap between the last column and the right edge of the grid control. This is annoying but tolerable, and certainly not expected behavior. Any clue?