GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Table of Contents
  • wx.lib.agw.shapedbutton.SBitmapButton
  • Show Source
  • index
  • modules
  • next
  • previous
  • Home
  • Gallery
  • wx.lib
  • wx.lib.agw
  • wx.lib.agw.shapedbutton

This view

  • Original page
  • New address

GeezerVison is showing docs.wxpython.org — wx.lib.agw.shapedbutton.SBitmapButton — wxPython 4.3.2 Docs

phoenix_title wx.lib.agw.shapedbutton.SBitmapButton¶

Subclass of SButton which displays a bitmap, acting like a wx.BitmapButton.


class_hierarchy Class Hierarchy¶

Inheritance diagram for class SBitmapButton:

Inheritance diagram of SBitmapButton


appearance Control Appearance¶


wxMSW

wxMSW¶

wxGTK

wxGTK¶

wxMAC

wxMAC¶


sub_classes Known Subclasses¶

wx.lib.agw.shapedbutton.SBitmapTextButton, wx.lib.agw.shapedbutton.SBitmapToggleButton


super_classes Known Superclasses¶

wx.lib.agw.shapedbutton.SButton


method_summary Methods Summary¶

__init__

Default class constructor.

DrawLabel

Draws the bitmap in the middle of the button.

GetBitmapDisabled

Returns the bitmap displayed when the button is disabled.

GetBitmapFocus

Returns the bitmap displayed when the button has the focus.

GetBitmapLabel

Returns the bitmap associated with the button in the normal state.

GetBitmapSelected

Returns the bitmap displayed when the button is selected (pressed).

SetBitmapDisabled

Sets the bitmap to display when the button is disabled.

SetBitmapFocus

Sets the bitmap to display when the button has the focus.

SetBitmapLabel

Sets the bitmap to display normally. This is the only one that is

SetBitmapSelected

Sets the bitmap to display when the button is selected (pressed).


api Class API¶

class SBitmapButton(SButton)¶

Subclass of SButton which displays a bitmap, acting like a wx.BitmapButton.


Methods¶

__init__(self, parent, id, bitmap, pos=wx.DefaultPosition, size=wx.DefaultSize)¶

Default class constructor.

Parameters:
  • parent – the SBitmapButton parent. Must not be None;

  • id – window identifier. A value of -1 indicates a default value;

  • bitmap – the button bitmap (if any);

  • pos – the control position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxPython, depending on platform;

  • size – the control size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxPython, depending on platform.



DrawLabel(self, dc, width, height, dw=0, dh=0)¶

Draws the bitmap in the middle of the button.

Parameters:
  • dc – an instance of wx.DC;

  • width – the button width;

  • height – the button height;

  • dw – width differential, to show a 3D effect;

  • dh – height differential, to show a 3D effect.



GetBitmapDisabled(self)¶

Returns the bitmap displayed when the button is disabled.



GetBitmapFocus(self)¶

Returns the bitmap displayed when the button has the focus.



GetBitmapLabel(self)¶

Returns the bitmap associated with the button in the normal state.



GetBitmapSelected(self)¶

Returns the bitmap displayed when the button is selected (pressed).



SetBitmapDisabled(self, bitmap)¶

Sets the bitmap to display when the button is disabled.

Parameters:

bitmap – a valid wx.Bitmap object.



SetBitmapFocus(self, bitmap)¶

Sets the bitmap to display when the button has the focus.

Parameters:

bitmap – a valid wx.Bitmap object.



SetBitmapLabel(self, bitmap, createothers=True)¶

Sets the bitmap to display normally. This is the only one that is required.

Parameters:
  • bitmap – a valid wx.Bitmap object;

  • createothers – if set to True, then the other bitmaps will be generated on the fly. Currently, only the disabled bitmap is generated.



SetBitmapSelected(self, bitmap)¶

Sets the bitmap to display when the button is selected (pressed).

Parameters:

bitmap – a valid wx.Bitmap object.

© Copyright 2012-2026, The wxPython Team. Created using Sphinx 9.1.0 and the python-docs-theme.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.