ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> wxpython-users
wxpython-users
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved