I want to display dozens of small images in a box, horizontally only, with a horizontal scroll bar.
I built a small app using wxListCtrl and can put lots of images in it (SetImageList then multiple InsertItem), but the box will only display 5 images in a line, then wraps to a new line and puts the next 5 there, etc.
Is there any way to disable the vertical scroll bar, and display a horizontal bar to accomplish this?
A better approach?
Rusty at Widgets, appreciate your help.
wxListCtrl Horizontal Scroll of images only?
-
- Earned a small fee
- Posts: 19
- Joined: Sat Dec 12, 2009 3:13 am
Re: wxListCtrl Horizontal Scroll of images only?
I don't think this is possible with wxListCtrl.
Alternatives:
a) Up to a count of around 200-400 images, you could just use a "normal" wxScrolledWindow and a horizontal wxBoxSizer and add the images as wxStaticBitmap or wxBitmapButton
b) For more images, i'd suggest a "virtual" control, e.g. wxHScrolledWindow. But this requires more management code on your side.
http://docs.wxwidgets.org/trunk/classwx ... indow.html
Alternatives:
a) Up to a count of around 200-400 images, you could just use a "normal" wxScrolledWindow and a horizontal wxBoxSizer and add the images as wxStaticBitmap or wxBitmapButton
b) For more images, i'd suggest a "virtual" control, e.g. wxHScrolledWindow. But this requires more management code on your side.
http://docs.wxwidgets.org/trunk/classwx ... indow.html
Use the source, Luke!
-
- Earned a small fee
- Posts: 19
- Joined: Sat Dec 12, 2009 3:13 am
Re: wxListCtrl Horizontal Scroll of images only?
Thanks DoubleMax. I'll give the first alternative a try.