This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi I've run the samples for this great looking control and read the help file, but I can't see where you've changed a setting so that the list on the left continues to loop, but the list on the right doesn't. The default seems to be that it doesn't loop, but I want the lists in an app I'm building to loop continually. Can you point me to what I need to do to achieve this? Thanks |
|
|
Hello Whether it loops or not is determined by the implementation of the IDataSource that you use. In the sample, the LoopingListBox on the left is using a NumericDataSource which only has support for looping. The one on the right is using a custom IDataSource called ZodiacDataSource which does not implement looping. We also provide a general purpose IDataSource called ObjectDataSource. An ObjectDataSource has a property called IsLooping to control if it loops or not. The default of this is false, meaning it does not loop. I recommend you use the ObjectDataSource. You can give it the list of items you want to display, and set the IsLooping property to true. You can then use this to set the DataSource property of the LoopingListBox. Alternatively you can implement your own IDataSource easily enough if you want to display data that is more complicated than a list of objects. The GetNext method takes in a current index and a number indicating which item to return relative to the current index. This is where looping can be implemented. - If the next index overflows the number of items, it can loop around to the beginning of the list. Let me know if you need more help with anything -Jason |
|
|
Fantastic! Thanks -I was looking for that IsLooping property on the control itself. I didn't think to check if it was available on the ODS. |
|