contents up previous next

wxstaticbitmap

a static bitmap control displays a bitmap. it is meant for display of the small icons in the dialog boxes and is not meant to be a general purpose image display control. in particular, under windows 9x the size of bitmap is limited to 64*64 pixels and thus you should use your own control if you want to display larger images portably.

derived from

wxcontrol
wxwindow
wxevthandler
wxobject

include files

<wx/statbmp.h>

window styles

there are no special styles for this control.

see also window styles overview.

see also

wxstaticbitmap, wxstaticbox

remarks

the bitmap to be displayed should have a small number of colours, such as 16, to avoid palette problems.

members

wxstaticbitmap::wxstaticbitmap
wxstaticbitmap::create
wxstaticbitmap::getbitmap
wxstaticbitmap::geticon
wxstaticbitmap::setbitmap
wxstaticbitmap::seticon


wxstaticbitmap::wxstaticbitmap

wxstaticbitmap()

default constructor.

wxstaticbitmap(wxwindow* parent, wxwindowid id, const wxbitmap& label, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = 0, const wxstring& name = "staticbitmap")

constructor, creating and showing a static bitmap control.

parameters

parent

id

label

pos

size

style

name

see also

wxstaticbitmap::create


wxstaticbitmap::create

bool create(wxwindow* parent, wxwindowid id, const wxbitmap& label, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = 0, const wxstring& name = "staticbitmap")

creation function, for two-step construction. for details see wxstaticbitmap::wxstaticbitmap.


wxstaticbitmap::getbitmap

wxbitmap getbitmap() const

returns the bitmap currently used in the control. notice that this method can be called even if seticon had been used.

see also

wxstaticbitmap::setbitmap


wxstaticbitmap::geticon

wxicon geticon() const

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 setbitmap).

see also

wxstaticbitmap::seticon


wxstaticbitmap::setbitmap

virtual void setbitmap(const wxbitmap& label)

sets the bitmap label.

parameters

label

see also

wxstaticbitmap::getbitmap


wxstaticbitmap::seticon

virtual void seticon(const wxicon& label)

sets the label to the given icon.

parameters

label

see also

wxstaticbitmap::geticon