Hi, I'm new, so please bear with me. I'm working on a memory card game in wxpython, using gui bitmap buttons.
I need to change the bitmap from the "face down" bitmap to another bitmap when the button is pressed. (and to wait for a second button to be pressed, then turn them both back to the first if they don't match, and remove them both if they do match, but that's a question for another day, I think....one thing at a time....)
Here is how I'm currently defining a "card".
c1 = wx.BitmapButton(self, -1, wx.Bitmap('/home/full/path/to/A.png'))
I need some help with the exactly syntax to use SetBitmapSelected to change the bitmap. I've read the online docs, and they are confusing to a novice programmer. No examples either.
Then I populate a grid with wx.GridSizer.
gs = wx.GridSizer(3, 4, 15, 15) gs.Add(c1) gs.Add(c2) gs.Add(c3)
and so on......
My second question, I can't get a relative path to the .png to work, it has to be a full path. Just in case it matters, I'm using Ubuntu Ibex.
Any hints and tips are much appreciated. I can handle straight up scripting languages just fine, but I'm learning wxpython from web tutorials and pdf books, and well, they aren't as clear as I might like, at least to me.
I can post the rest of my simple program if you think it'll help.