RE: EuGrid Column Spacing
- Posted by Phil Russell <pg_russell at lineone.net> Mar 27, 2003
- 347 views
C.K., There is no built-in way at present but I think that it would be fairly easy to do yourself. I don't have access to the code where I am but from memory you could do something like: 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: EGW_GetGridProperty( grid, EGW_ROW_HEADER_WIDTH) ) 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. Regards, Phil C. K. Lester wrote: > Is there a way to have the columns of the grid spaced 100%? For > instance, I > want the first column to take up 30% of the available horizontal space > and > the second column to take up the remaining 70%. I looked at doing this > with > xControls, but I got stuck. > >