Package wx :: Package lib :: Module platebtn
[frames | no frames]

Module wx.lib.platebtn

Editra Control Library: PlateButton

The PlateButton is a custom owner drawn flat button, that in many ways emulates the buttons found the bookmark bar of the Safari browser. It can be used as a drop in replacement for wx.Button/wx.BitmapButton under most circumstances. It also offers a wide range of options for customizing its appearance, a description of each of the main style settings is listed below.

Main Button Styles: Any combination of the following values may be passed to the constructor's style keyword parameter.

PB_STYLE_DEFAULT: Creates a flat label button with rounded corners, the highlight for mouse over and press states is based off of the hightlight color from the systems current theme.

PB_STYLE_GRADIENT: The highlight and press states are drawn with gradient using the current highlight color.

PB_STYLE_SQUARE: Instead of the default rounded shape use a rectangular shaped button with square edges.

PB_STYLE_NB: This style only has an effect on Windows but does not cause harm to use on the platforms. It should only be used when the control is shown on a panel or other window that has a non solid color for a background. i.e a gradient or image is painted on the background of the parent window. If used on a background with a solid color it may cause the control to loose its transparent appearance.

Other attributes can be configured after the control has been created. The settings that are currently available are as follows:

Overridden Methods Inherited from PyControl:

Requirements:

Classes
PlateButton PlateButton is a custom type of flat button with support for displaying bitmaps and having an attached dropdown menu.

Function Summary
  AdjustAlpha(colour, alpha)
Adjust the alpha of a given colour

Variable Summary
int PB_STYLE_DEFAULT = 1                                                                     
int PB_STYLE_GRADIENT = 2                                                                     
int PB_STYLE_NOBG = 8                                                                     
int PB_STYLE_SQUARE = 4                                                                     
int PLATE_HIGHLIGHT = 2                                                                     
int PLATE_NORMAL = 0                                                                     
int PLATE_PRESSED = 1                                                                     

Function Details

AdjustAlpha(colour, alpha)

Adjust the alpha of a given colour


Variable Details

PB_STYLE_DEFAULT

Type:
int
Value:
1                                                                     

PB_STYLE_GRADIENT

Type:
int
Value:
2                                                                     

PB_STYLE_NOBG

Type:
int
Value:
8                                                                     

PB_STYLE_SQUARE

Type:
int
Value:
4                                                                     

PLATE_HIGHLIGHT

Type:
int
Value:
2                                                                     

PLATE_NORMAL

Type:
int
Value:
0                                                                     

PLATE_PRESSED

Type:
int
Value:
1                                                                     

Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:55:35 2009 http://epydoc.sf.net