Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Jun 21, 2018 2:48 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How do I display a list of images users can scroll through?
PostPosted: Tue Mar 19, 2013 2:12 pm 
Offline

Joined: Tue Mar 19, 2013 7:11 am
Posts: 10
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
 Profile  
Reply with quote  
 Post subject: Re: How do I display a list of images users can scroll throu
PostPosted: Tue Mar 19, 2013 2:49 pm 
Offline

Joined: Wed Mar 22, 2006 11:15 am
Posts: 712
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
 Profile  
Reply with quote  
 Post subject: Re: How do I display a list of images users can scroll throu
PostPosted: Tue Mar 19, 2013 2:55 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
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
 Profile  
Reply with quote  
 Post subject: Re: How do I display a list of images users can scroll throu
PostPosted: Tue Mar 19, 2013 10:54 pm 
Offline
User avatar

Joined: Sun Jan 25, 2009 5:11 pm
Posts: 576
Location: Guatemala, Central America
Perhaps this:

https://bitbucket.org/garrypettet/fgthumbnailcanvas

_________________
Future RS guru.
Ride the world!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group