If the stock DataRepeater control works well for you that's just great. But sometimes it can be awkward to work with because of its use of data binding and the need for a separate OCX containing the "scrolled" control.
Refresher:
The DataRepeater control functions as a scrollable container of data-bound user controls. Each control appears in its own row as a "repeated" control, allowing the user to view several data-bound user controls at once.
Scroller
Scroller, as presented here, is not a finished drop-in component but a technique that can be used as an alternative to the MSDatRep.ocx plus one or more additional custom "scrolled control" OCXs. Unlike the DataRepeater control, the Scroller technique shown here even allows scrolled items to vary in height.
Note that this demo only explores a repeated control that presents static information, i.e. it has no data entry controls. This simplifies the demo though you could certainly extend the concept to do so.
Instead of normal data binding, Scroller was built using a "virtual view" approach. As the user scrolls the Scroller control a callback event is raised to fetch data to be "painted" into the scrolled view. So you will still need access to the entire set of data, though it could be held in a database, a Recordset, or Collections and arrays as done in the demo.
If you added data entry/edit controls to your scrolled control you might want to add a second callback to feed changes back to the parent Form for storage.
Scroller Demo
The demo uses a set of Twitter™-like messages based on quotes and images from the movie Office Space, just to make it a little more entertaining.
![Name: sshot1.png
Views: 80
Size: 15.0 KB]()
While this demo doesn't do data entry, it does accept mouse clicks. A click on an item brings up a secondary window with more detail than may have fit in the scrollable view, e.g.:
![Name: sshot2.png
Views: 49
Size: 19.0 KB]()
This is obviously a stripped down bare example, but I hope you find uses for it. I'm not sure most programmers are even aware of the DataRepeater, and fewer still have bothered dealing with its quirks. Maybe this simplified approach will offer inspiration.
The trickiest part of this demo is the dynamic vertical sizing that tracks autosize Label controls. If you stripped that out there isn't a whole lot here.
The data and images are included. The data is in a delimited text format next to the JPEG images used here.
Refresher:
Quote:
The DataRepeater control functions as a scrollable container of data-bound user controls. Each control appears in its own row as a "repeated" control, allowing the user to view several data-bound user controls at once.
Scroller
Scroller, as presented here, is not a finished drop-in component but a technique that can be used as an alternative to the MSDatRep.ocx plus one or more additional custom "scrolled control" OCXs. Unlike the DataRepeater control, the Scroller technique shown here even allows scrolled items to vary in height.
Note that this demo only explores a repeated control that presents static information, i.e. it has no data entry controls. This simplifies the demo though you could certainly extend the concept to do so.
Instead of normal data binding, Scroller was built using a "virtual view" approach. As the user scrolls the Scroller control a callback event is raised to fetch data to be "painted" into the scrolled view. So you will still need access to the entire set of data, though it could be held in a database, a Recordset, or Collections and arrays as done in the demo.
If you added data entry/edit controls to your scrolled control you might want to add a second callback to feed changes back to the parent Form for storage.
Scroller Demo
The demo uses a set of Twitter™-like messages based on quotes and images from the movie Office Space, just to make it a little more entertaining.
While this demo doesn't do data entry, it does accept mouse clicks. A click on an item brings up a secondary window with more detail than may have fit in the scrollable view, e.g.:
This is obviously a stripped down bare example, but I hope you find uses for it. I'm not sure most programmers are even aware of the DataRepeater, and fewer still have bothered dealing with its quirks. Maybe this simplified approach will offer inspiration.
The trickiest part of this demo is the dynamic vertical sizing that tracks autosize Label controls. If you stripped that out there isn't a whole lot here.
The data and images are included. The data is in a delimited text format next to the JPEG images used here.