T
Tom
I need to make up a 'grid' of controls at run time. The controls (of which I
wrote) I will instantiate, then I need to arrange these in a row/column
layout. For example, let's say I instantiate 20 of the controls; then I want
to position them in a grid-like display (within a Windows Form) as 5 rows of
4 controls each. If the 'grid' doesn't fit within the frame of where it is
being generated then scroll bars should appear so that the user can 'scroll'
up and down or sideways to see the controls.
Has anyone done this kind of thing, and has some example code? Yes, I can
write all the code myself, but it is going to be complicated and I don't
really want to reinvent the wheel. This would be REALLY easy if somehow I
could use the grid control itself, and place each of my run-time generated
controls within each cell of the grid (thereby using the grid's row/column
format and scrolling capabilities); however, I have tried this and it
doesn't work as expected. Moreover, I've been told that it can't do this.
Any ideas? Thanks in advance.
Tom
wrote) I will instantiate, then I need to arrange these in a row/column
layout. For example, let's say I instantiate 20 of the controls; then I want
to position them in a grid-like display (within a Windows Form) as 5 rows of
4 controls each. If the 'grid' doesn't fit within the frame of where it is
being generated then scroll bars should appear so that the user can 'scroll'
up and down or sideways to see the controls.
Has anyone done this kind of thing, and has some example code? Yes, I can
write all the code myself, but it is going to be complicated and I don't
really want to reinvent the wheel. This would be REALLY easy if somehow I
could use the grid control itself, and place each of my run-time generated
controls within each cell of the grid (thereby using the grid's row/column
format and scrolling capabilities); however, I have tried this and it
doesn't work as expected. Moreover, I've been told that it can't do this.
Any ideas? Thanks in advance.
Tom