RE: EuGrid Column Spacing

new topic     » goto parent     » topic index » view thread      » older message » newer message

C.K.,

Hmm. Difficult to say without seeing the code.  Could it be a small 
error in your pixel width calculation e.g. rounding error or something?

If you can't spot it then could you post up the code for me to look at? 

Phil



C. K. Lester wrote:
> > > 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?
> 
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu