Table Of Contents

Previous topic

StandardPaths

Next topic

StaticBox

This Page

phoenix_title StaticBitmap

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 6464 pixels.

If you want to display larger images portably, you may use generic implementation GenericStaticBitmap declared in <wx/generic/statbmpg.h>.


class_hierarchy Inheritance Diagram

Inheritance diagram for class StaticBitmap

Inheritance diagram of StaticBitmap


appearance Control Appearance


wxMSW

wxMSW

wxMAC

wxMAC

wxGTK

wxGTK


method_summary Methods Summary

__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.

property_summary Properties Summary

Bitmap See GetBitmap and SetBitmap
Icon See GetIcon and SetIcon

api Class API



class StaticBitmap(Control)

A static bitmap control displays a bitmap.

Possible constructors:

StaticBitmap()

StaticBitmap(parent, id=ID_ANY, label=NullBitmap, pos=DefaultPosition,
             size=DefaultSize, style=0, name=StaticBitmapNameStr)

Methods



__init__(self, *args, **kw)

overload Overloaded Implementations:



__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:
  • parent (Window) – Parent window. Should not be None.
  • id (int) – Control identifier. A value of -1 denotes a default value.
  • label (Bitmap) – Bitmap label.
  • pos (Point) – Window position.
  • size (Size) – Window size.
  • style (long) – Window style. See StaticBitmap.
  • name (string) – Window name.

See also

Create





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 StaticBitmap .

Parameters:
  • parent (Window) –
  • id (int) –
  • label (Bitmap) –
  • pos (Point) –
  • size (Size) –
  • style (long) –
  • name (string) –
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: Bitmap

See also

SetBitmap



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 StaticBitmap.SetBitmap ).

Return type: Icon

See also

SetIcon



SetBitmap(self, label)

Sets the bitmap label.

Parameters:label (Bitmap) – The new bitmap.

See also

GetBitmap



SetIcon(self, label)

Sets the label to the given icon.

Parameters:label (Icon) – The new icon.

Properties



Bitmap

See GetBitmap and SetBitmap



Icon

See GetIcon and SetIcon