I want to create a generic screen which will display text as well as images in a way that i can scroll them..
currently if i use label or listbox, it doesn't show any sort of scrollbar, though it does allow to add text/images but it is not elegant. i am not asking for a ready made control.. even an idea will do, i'l write it myself. i am just not able to get the idea how to start such a control... 
Building a scrollbar...
Wed, 02/03/2010 - 12:35


There are a couple of ways you can do it. Firstly, you can take the ListBox code from http://code.google.com/p/mosync and create a new Widget based on that. You know the size of the complete list box (the sum of listbox->getChildren()[n].size()), the amount you've got visible on screen, and the yOffset of the listbox so you can show how far down the screen it is. You can then draw a scroll box on the side.
Secondly, you can create a new widget which contains a listbox and set aside some space for the scrollbar. You can still tell the total amount of space required by the listbox, and the amount you've got on screen, but you can't tell by how much the listbox has already scrolled. Either you need to do it the first way, or create a new listbox class from the source and just expose the yOffset and do it the second way.
There is a tutorial coming soon on creating new widgets which may help as well.
Let me know if you've got any more questions about how to do this.