Re: [wxpython-users] Inserting a BitMap into a Sizer
by Andrea Gavana other posts by this author
May 9 2008 3:04AM messages near this date
[wxpython-users] Inserting a BitMap into a Sizer
|
[wxpython-users] wx.Panel doubts...
Hi David,
On Fri, May 9, 2008 at 1:41 AM, David Anderson wrote:
> How to insert a wx.StaticBitmap into a BoxSizer?
Try something like this:
bmp = wx.Bitmap("image.jpg", wx.wx.BITMAP_TYPE_JPEG)
myBitmap = wx.StaticBitmap(self, -1, bmp)
# No expansion
theSizer.Add(myBitmap, 0)
# OR, expand in the main orientation of the wxBoxSizer
theSizer.Add(myBitmap, 1)
# OR, expand in the main orientation of the wxBoxSizer and
# fill the space assigned to the bitmap
theSizer.Add(myBitmap, 1, wx.EXPAND)
I suggest you to take a look at the wxPython demo on sizers, and to
the nice example made by Jean-Michel Fauth here:
http://spinecho.ifrance.com/LearnSizers7.zip
And to the wxPython Wiki:
http://wiki.wxpython.org/index.cgi/UsingSizers
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
_______________________________________________
wxpython-users mailing list
wxpython-users@[...].org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Thread:
David Anderson
Andrea Gavana
|