0

I want to display a list of icons in horizontal format in wxpython. I'm using wxglade and I can't find how to set list's orientation. Each item has an icon and below that it has a caption. Is this kind of design possible?

prongs
  • 9,422
  • 21
  • 67
  • 105

2 Answers2

0

something like

class MyList(wx.ScrollPanel):
   def __init__(self,the_list,parent):
      wx.ScrollPanel.__init__(self,parent,-1)
      self.SetMinSize((parent.GetSize()[0],-1))
      sz = wx.BoxSizer(wx.HORIZONTAL)
      for Item in the_list:
           sz.Add(Item)
      self.SetSizer(sz)
      self.Layout()

where each item in the_list is a wx.Panel that includes your icon and text...

something like this at least... its untested... and no idea how you would do it within wxGlade

Joran Beasley
  • 110,522
  • 12
  • 160
  • 179
0

The ListCtrl doesn't support that in report mode. I suppose you might be able to do it with one of the other style flags though. However Joran has the right idea. However, I would create a series of wx.Image or wx.StaticBitmap widgets and add them to a horizontal BoxSizer instead of what he did.

Mike Driscoll
  • 32,629
  • 8
  • 45
  • 88