New topic: How do I display a list of images users can scroll through?
<http://forums.realsoftware.com/viewtopic.php?t=47336> Page 1 of 1 [ 4 posts ] Previous topic | Next topic Author Message cbmeeks Post subject: How do I display a list of images users can scroll through?Posted: Tue Mar 19, 2013 2:12 pm Joined: Tue Mar 19, 2013 7:11 am Posts: 4 I'm creating a tile/sprite editor with RS. I have the basic drawing working pretty well. But what I want to do is be able to store my "sprites" in a collection so they can be exported to disk, converted, etc. I can post screen shots later but basically, think of the "zoom" part on the left and the "collection" on the right. I was thinking of maybe using a list box? The purpose is that I want the user to click a tile in the collection and that sprite will be used for the editing. Of course, I need to be able to add/remove them to the collection and scroll (vertically) through the list. Internally, each sprite will only be 64 bytes so a simple array would work. But in the list, what the user sees, I'd need to be able to store small canvasses I guess? Any suggestions? Thanks Top taylor-design Post subject: Re: How do I display a list of images users can scroll throuPosted: Tue Mar 19, 2013 2:49 pm Joined: Wed Mar 22, 2006 11:15 am Posts: 626 Location: Southern California Desktop app, right? You could take advantage of the ListBox cell paint events, and draw one sprite per cell. That would probably be faster/easier then using a Canvas to do it since the ListBox would handle stuff like scrolling and clicking, though a Canvas subclass would certainly work as well. I would not store or try to manipulate a bunch of small canvases on the window. _________________ Daniel L. Taylor Custom Controls for Real Studio WE! Visit: http://www.webcustomcontrols.com/ Top timhare Post subject: Re: How do I display a list of images users can scroll throuPosted: Tue Mar 19, 2013 2:55 pm Joined: Fri Jan 06, 2006 3:21 pm Posts: 12160 Location: Portland, OR USA Definitely use a listbox. Store the image in RowTag and draw it in whichever Cell..Paint event works best for you. Top HMARROQUINC Post subject: Re: How do I display a list of images users can scroll throuPosted: Tue Mar 19, 2013 10:54 pm Joined: Sun Jan 25, 2009 5:11 pm Posts: 537 Location: Guatemala, Central America Perhaps this: https://bitbucket.org/garrypettet/fgthumbnailcanvas _________________ Future RS guru. Ride the world! Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 4 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
