Keeping columns in view in a grid

I’m writing an application using wxruby in which the main portion is
essentially a spreadsheet using a Grid widget. The extent of the Grid
is
such that it exceeds the available space that can be seen at once, so it
will be necessary to use scrollbars to see data as necessary. However,
the
first two columns should stay in view even when the Grid is scrolled
horizontally. (They contain names and ID numbers, so it would be
confusing
to have them go out of view when the grid is scrolled to the right.)
Does
anyone have suggestions on how to accomplish this?

Will P. wrote in post #1002674:

I’m writing an application using wxruby in which the main portion is
essentially a spreadsheet using a Grid widget. The extent of the Grid
is
such that it exceeds the available space that can be seen at once, so it
will be necessary to use scrollbars to see data as necessary. However,
the
first two columns should stay in view even when the Grid is scrolled
horizontally. (They contain names and ID numbers, so it would be
confusing
to have them go out of view when the grid is scrolled to the right.)
Does
anyone have suggestions on how to accomplish this?

I’m not sure that the wxGrid control supports the ability to “freeze”
columns.

If not, you could perhaps use 2 grids, side by side, with the left grid
displaying the first two columns of your data and the right grid
displaying the remaining columns. You’d need, of course, to keep them in
sync as you scroll down through the rows.

David

http://rubyonwindows.blogspot.com

the easiest way to accomplish this is to merge your two columns into one
and put them into the row label. It might not be what you’re looking for
but it’s definitely less effort than syncing two grids.

T

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs