My project is YouTube and the home page includes the videos you can watch. A video is made of a thumbnail and a button just underneath 'Play'. I would like to have a wxpython panel that is made like this... \image\ button \image\ button and so on
An image at the top of the screen that is placed in the center horizontally and a button just underneath. Then just below the button of the first video, an image and then a button, so on and so on.
I tried looking at sizers and I imagine the solution will include sizers but I had a hard time understanding how it works and how I could use it to resolve my problem.
This is what I have so far (placing the first image in the center horizontally)
self.image = wx.StaticBitmap(self)
self.image.SetBitmap(wx.Bitmap('icon.png'))
self.topsizer = wx.BoxSizer(wx.HORIZONTAL)
self.topsizer.Add(self.image, wx.ALIGN_CENTER_HORIZONTAL)
self.SetSizer(self.topsizer)
self.Layout()
The thing to remember, is that people can't just
sharecode, unless they are doing what you are trying to do. It has to be written.Try using this as a starting point.
The image rescaling is specific to my images, to make them the right size.