Package wx :: Package lib :: Module buttons :: Class GenButton
[frames | no frames]

Type GenButton

object --+                    
         |                    
    Object --+                
             |                
    EvtHandler --+            
                 |            
            Window --+        
                     |        
               Control --+    
                         |    
                 PyControl --+
                             |
                            GenButton

Known Subclasses:
FontSelect, GenBitmapButton, GenToggleButton, ThemedGenButton

A generic button, and base class for the other generic buttons.


Method Summary
  __init__(self, parent, id, label, pos, size, style, validator, name)
  AcceptsFocus(self)
Overridden base class virtual.
  DoGetBestSize(self)
Overridden base class virtual.
  DrawBezel(self, dc, x1, y1, x2, y2)
  DrawFocusIndicator(self, dc, w, h)
  DrawLabel(self, dc, width, height, dx, dy)
  Enable(self, enable)
  GetBackgroundBrush(self, dc)
  GetBezelWidth(self)
Return the width of the 3D effect
  GetDefaultAttributes(self)
Overridden base class virtual.
  GetUseFocusIndicator(self)
Return focus indicator flag
  InitColours(self)
Calculate a new set of highlight and shadow colours based on the background colour.
  InitOtherEvents(self)
Override in a subclass to initialize any other events that need to be bound.
  Notify(self)
  OnGainFocus(self, event)
  OnKeyDown(self, event)
  OnKeyUp(self, event)
  OnLeftDown(self, event)
  OnLeftUp(self, event)
  OnLoseFocus(self, event)
  OnMotion(self, event)
  OnPaint(self, event)
  OnSize(self, event)
  SetBackgroundColour(self, colour)
  SetBestSize(self, size)
Given the current font and bezel width settings, calculate and set a good size.
  SetBezelWidth(self, width)
Set the width of the 3D effect
  SetDefault(self)
  SetForegroundColour(self, colour)
  SetInitialSize(self, size)
Given the current font and bezel width settings, calculate and set a good size.
  SetUseFocusIndicator(self, flag)
Specifiy if a focus indicator (dotted line) should be used
  ShouldInheritColours(self)
Overridden base class virtual.

Property Summary

Class Variable Summary
int labelDelta = 1                                                                     

Instance Method Details

AcceptsFocus(self)

Overridden base class virtual.

Overrides:
wx.Window.AcceptsFocus

DoGetBestSize(self)

Overridden base class virtual. Determines the best size of the button based on the label and bezel size.

Overrides:
wx.PyControl.DoGetBestSize

GetBezelWidth(self)

Return the width of the 3D effect

GetDefaultAttributes(self)

Overridden base class virtual. By default we should use the same font/colour attributes as the native Button.

Overrides:
wx.PyControl.GetDefaultAttributes

GetUseFocusIndicator(self)

Return focus indicator flag

InitColours(self)

Calculate a new set of highlight and shadow colours based on the background colour. Works okay if the colour is dark...

InitOtherEvents(self)

Override in a subclass to initialize any other events that need to be bound. Added so __init__ doesn't need to be overriden, which is complicated with multiple inheritance

SetBestSize(self, size=None)

Given the current font and bezel width settings, calculate and set a good size.

Overrides:
wx.Window.SetInitialSize

SetBezelWidth(self, width)

Set the width of the 3D effect

SetInitialSize(self, size=None)

Given the current font and bezel width settings, calculate and set a good size.

Overrides:
wx.Window.SetInitialSize

SetUseFocusIndicator(self, flag)

Specifiy if a focus indicator (dotted line) should be used

ShouldInheritColours(self)

Overridden base class virtual. Buttons usually don't inherit the parent's colours.

Overrides:
wx.Window.ShouldInheritColours

Class Variable Details

labelDelta

Type:
int
Value:
1                                                                     

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