Page 1 of 1

wxListCtrl Horizontal Scroll of images only?

Posted: Thu Jun 12, 2014 8:37 pm
by faradayent
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.

Re: wxListCtrl Horizontal Scroll of images only?

Posted: Thu Jun 12, 2014 11:05 pm
by doublemax
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

Re: wxListCtrl Horizontal Scroll of images only?

Posted: Fri Jun 13, 2014 5:37 am
by faradayent
Thanks DoubleMax. I'll give the first alternative a try.