A static bitmap control displays a bitmap.
Native implementations on some platforms are only meant for display of the small icons in the dialog boxes. In particular, under Windows 9x the size of bitmap is limited to 64x64 pixels.
If you want to display larger images portably, you may use generic implementation GenericStaticBitmap declared in <wx/generic/statbmpg.h>.
Notice that for the best results, the size of the control should be the same as the size of the image displayed in it, as happens by default if if it’s not resized explicitly. Otherwise, behaviour depends on the platform: under MSW, the bitmap is drawn centred inside the control, while elsewhere it is drawn at the origin of the control.
See also
__init__ |
Default constructor. |
Create |
Creation function, for two-step construction. |
GetBitmap |
Returns the bitmap currently used in the control. |
GetIcon |
Returns the icon currently used in the control. |
SetBitmap |
Sets the bitmap label. |
SetIcon |
Sets the label to the given icon. |
wx.
StaticBitmap
(Control)¶Possible constructors:
StaticBitmap()
StaticBitmap(parent, id=ID_ANY, label=NullBitmap, pos=DefaultPosition,
size=DefaultSize, style=0, name=StaticBitmapNameStr)
A static bitmap control displays a bitmap.
__init__
(self, *args, **kw)¶__init__ (self)
Default constructor.
__init__ (self, parent, id=ID_ANY, label=NullBitmap, pos=DefaultPosition, size=DefaultSize, style=0, name=StaticBitmapNameStr)
Constructor, creating and showing a static bitmap control.
Parameters: |
|
---|
See also
Create
(self, parent, id=ID_ANY, label=NullBitmap, pos=DefaultPosition, size=DefaultSize, style=0, name=StaticBitmapNameStr)¶Creation function, for two-step construction.
For details see wx.StaticBitmap.
Parameters: | |
---|---|
Return type: | bool |
GetBitmap
(self)¶Returns the bitmap currently used in the control.
Notice that this method can be called even if SetIcon
had been used.
Return type: | wx.Bitmap |
---|
See also
GetIcon
(self)¶Returns the icon currently used in the control.
Notice that this method can only be called if SetIcon
had been used: an icon can’t be retrieved from the control if a bitmap had been set (using wx.StaticBitmap.SetBitmap
).
Return type: | wx.Icon |
---|
See also
SetBitmap
(self, label)¶Sets the bitmap label.
Parameters: | label (wx.Bitmap) – The new bitmap. |
---|
See also