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.
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 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. You can use SetScaleMode
to control how the image is scaled inside the control.
Inheritance diagram for class
StaticBitmap:
Control Appearance¶ Methods Summary¶ Properties Summary¶ Class API¶Possible constructors:
StaticBitmap() -> None StaticBitmap(parent, id=ID_ANY, bitmap=NullBitmap, pos=DefaultPosition, size=DefaultSize, style=0, name=StaticBitmapNameStr) -> None
A static bitmap control displays a bitmap.
__init__ (self)
Default constructor.
None
__init__ (self, parent, id=ID_ANY, bitmap=NullBitmap, pos=DefaultPosition, size=DefaultSize, style=0, name=StaticBitmapNameStr)
Constructor, creating and showing a static bitmap control.
parent (wx.Window) â Parent window. Should not be None
.
id (wx.WindowID) â Control identifier. A value of -1 denotes a default value.
bitmap (wx.BitmapBundle)
pos (wx.Point) â Window position.
size (wx.Size) â Window size.
style (long) â Window style. See wx.StaticBitmap.
name (string) â Window name.
Bitmap label.
None
Creation function, for two-step construction.
For details see wx.StaticBitmap.
parent (wx.Window)
id (wx.WindowID)
bitmap (wx.BitmapBundle)
pos (wx.Point)
size (wx.Size)
style (long)
name (string)
bool
Returns the bitmap currently used in the control.
Notice that this method can be called even if SetIcon
had been used.
variant (WindowVariant)
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
).
Returns the scale mode currently used in the control.
Added in version 4.1/wxWidgets-3.1.0.
Sets the bitmap label.
label (wx.BitmapBundle) â The new bitmap.
None
Sets the label to the given icon.
label (wx.Icon) â The new icon.
None
Sets the scale mode.
scaleMode (ScaleMode) â Controls how the bitmap is scaled inside the control.
None
Added in version 4.1/wxWidgets-3.1.0.
Note
Currently only the generic implementation supports all scaling modes. You may use generic implementation GenericStaticBitmap declared in <wx/generic/statbmpg.h> in all ports.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4