scroll panel for buttons

BlitzMax Forums/Brucey's Modules/scroll panel for buttons

slenkar(Posted 2009) [#1]
If I had 30 different tiles for a map editor, and I had image buttons to represent them, how would I make sure they fit on the screen?

Is it possible to use scrollbars to go up and down a list of buttons?


DavidDC(Posted 2009) [#2]
How about a wxListCtrl with your tiles as row icons?


slenkar(Posted 2009) [#3]
could do, are they only 32x32 or can they be bigger?


Brucey(Posted 2009) [#4]
You could always use a wxScrolledWindow.
There's a small example of its usage in the "splitter" sample.

Here's another very basic example :


Note that you can also override OnDraw(), and do your own drawing of the window contents if you prefer. For example, you might simply draw your images in there, and add extra functionality to check for clicks etc - like a custom image-grid control.

There are, of course, many ways to do this :-)


slenkar(Posted 2009) [#5]
thanks, good example