wxRuby Documentation Home

Wx::StaticBitmap

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

Control

Window

EvtHandler

Object

Window styles

There are no special styles for this control.

See also window styles overview.

See also

StaticBitmap, StaticBox

Remarks

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

Methods

StaticBitmap.new

StaticBitmap.new(%(arg-type)Window% parent, Integer id, Bitmap label, Point pos = DEFAULT_POSITION, Size size = DEFAULT_SIZE, Integer style = 0, String name = “staticBitmap”)

Constructor, creating and showing a text control.

Parameters

See also

StaticBitmap#create

StaticBitmap#create

Boolean create(%(arg-type)Window% parent, Integer id, Bitmap label, Point pos = DEFAULT_POSITION, Size size = DEFAULT_SIZE, Integer style = 0, String name = “staticBitmap”)

Creation function, for two-step construction. For details see StaticBitmap.new.

StaticBitmap#get_bitmap

Bitmap get_bitmap()

Returns the bitmap currently used in the control. Notice that this method can
be called even if set_icon had been used.

See also

StaticBitmap#set_bitmap

StaticBitmap#get_icon

Icon get_icon()

Returns the icon currently used in the control. Notice that this method can
only be called if set_icon had been used: an icon
can’t be retrieved from the control if a bitmap had been set (using
set_bitmap).

See also

StaticBitmap#set_icon

StaticBitmap#set_bitmap

set_bitmap(%(arg-type)Bitmap% label)

Sets the bitmap label.

Parameters

See also

StaticBitmap#get_bitmap

StaticBitmap#set_icon

set_icon(%(arg-type)Icon% label)

Sets the label to the given icon.

Parameters

See also

StaticBitmap#get_icon

[This page automatically generated from the Textile source at 2023-06-03 08:07:40 +0000]