Package wx :: Package lib :: Module buttonpanel :: Class ButtonPanel

[frames | no frames]

## Type ButtonPanel

    object --+
             |
        Object --+
                 |
        EvtHandler --+
                     |
                Window --+
                         |
                     Panel --+
                             |
                       PyPanel --+
                                 |
                                ButtonPanel

Method Summary
| ``__init__`(self, parent, id, text, style, alignment, name)` Default class constructor.
| ``AddButton`(self, btnInfo)` Adds a button to ButtonPanel.
| ``AddControl`(self, control, proportion, flag, border)` Adds a wxPython control to ButtonPanel.
| ``AddSeparator`(self)` Adds a separator line to ButtonPanel.
| ``AddSpacer`(self, size, proportion, flag)` Adds a spacer (stretchable or fixed-size) to ButtonPanel.
| ``DoGetBestSize`(self)` Returns the best size of ButtonPanel.
| ``DoGiveHelp`(self, hit)` Gives tooltips and help in StatusBar.
| ``DoLayout`(self)` Do the Layout for ButtonPanel.
| ``FlexibleLayout`(self, nonspacers, allchildren)` Layout the items when the main caption exists.
| ``GetAlignment`(self)` Returns the button alignment (left, right, top, bottom).
| ``GetBarText`(self)` Returns the main caption text.
| ``GetBPArt`(self)` Returns the associated BPArt art provider.
| ``GetControls`(self)` Returns the wxPython controls that belongs to ButtonPanel.
| ``GetItemSize`(self, item, isVertical)` Returns the size of an item in the main ButtonPanel sizer.
| ``GetNonFlexibleChildren`(self)` Returns all the ButtonPanel main sizer's children that are not flexible spacers.
| ``GetStyle`(self)` Returns the ButtonPanel style.
| ``GetUseHelp`(self)` Returns whether or not shortHelp and longHelp should be displayed.
| ``HasBarText`(self)` Returns whether ButtonPanel has a main caption text or not.
| ``HitTest`(self, pt)` HitTest method for ButtonPanel.
| ``IsStandard`(self)` Returns whether ButtonPanel is aligned "Standard" (left/top) or not.
| ``IsVertical`(self)` Returns whether ButtonPanel is vertically aligned or not.
| ``LayoutItems`(self)` Layout the items using a different algorithm depending on the existance of the main caption.
| ``OnEraseBackground`(self, event)` Handles the wx.EVT_ERASE_BACKGROUND event for ButtonPanel (does nothing).
| ``OnLeftDown`(self, event)` Handles the wx.EVT_LEFT_DOWN event for ButtonPanel.
| ``OnLeftUp`(self, event)` Handles the wx.EVT_LEFT_UP event for ButtonPanel.
| ``OnMouseEnterWindow`(self, event)` Handles the wx.EVT_ENTER_WINDOW event for ButtonPanel.
| ``OnMouseLeave`(self, event)` Handles the wx.EVT_LEAVE_WINDOW event for ButtonPanel.
| ``OnMouseMove`(self, event)` Handles the wx.EVT_MOTION event for ButtonPanel.
| ``OnPaint`(self, event)` Handles the wx.EVT_PAINT event for ButtonPanel.
| ``OnSize`(self, event)` Handles the wx.EVT_SIZE event for ButtonPanel.
| ``OnStatusBarTimer`(self)` Handles the timer expiring to delete the longHelp in the StatusBar.
| ``ReCreateSizer`(self, text)` Recreates the ButtonPanel sizer accordingly to the alignment specified.
| ``RemoveAllButtons`(self)` Remove all the buttons from ButtonPanel.
| ``RemoveAllSeparators`(self)` Remove all the separators from ButtonPanel.
| ``RemoveHelp`(self)` Removes the tooltips and statusbar help (if any) for a button.
| ``RemoveText`(self)` Removes the main caption text.
| ``RepaintOldSelection`(self)` Repaints the old selected/hovered button.
| ``SetAlignment`(self, alignment)` Sets the button alignment (left, right, top, bottom).
| ``SetBarText`(self, text)` Sets the main caption text (leave text="" for no text).
| ``SetBPArt`(self, art)` Sets a new BPArt to ButtonPanel.
| ``SetStyle`(self, style)` Sets ButtonPanel style.
| ``SetUseHelp`(self, useHelp)` Sets whether or not shortHelp and longHelp should be displayed.
| ``SizeLayout`(self, nonspacers, children)` Layout the items when no main caption exists.

Property Summary

Instance Method Details

### __init__(self, parent, id=-1, text='', style=1, alignment=2, name='buttonPanel')
(Constructor)

Default class constructor.

- parent: parent window
- id: window ID
- text: text to draw
- style: window style
- alignment: alignment of buttons (left or right)
- name: window class name

  Overrides:
    `wx.PyPanel.__init__`

### AddButton(self, btnInfo)

Adds a button to ButtonPanel. Remember to pass a ButtonInfo instance to this method. See the demo for details.

### AddControl(self, control, proportion=0, flag=2544, border=None)

Adds a wxPython control to ButtonPanel.

### AddSeparator(self)

Adds a separator line to ButtonPanel.

### AddSpacer(self, size=(0, 0), proportion=1, flag=8192)

Adds a spacer (stretchable or fixed-size) to ButtonPanel.

### DoGetBestSize(self)

Returns the best size of ButtonPanel.

  Overrides:
    `wx.PyPanel.DoGetBestSize`

### DoGiveHelp(self, hit)

Gives tooltips and help in StatusBar.

### DoLayout(self)

Do the Layout for ButtonPanel. NB: Call this method every time you make a modification to the layout or to the customizable sizes of the pseudo controls.

### FlexibleLayout(self, nonspacers, allchildren)

Layout the items when the main caption exists.

### GetAlignment(self)

Returns the button alignment (left, right, top, bottom).

### GetBarText(self)

Returns the main caption text.

### GetBPArt(self)

Returns the associated BPArt art provider.

### GetControls(self)

Returns the wxPython controls that belongs to ButtonPanel.

### GetItemSize(self, item, isVertical)

Returns the size of an item in the main ButtonPanel sizer.

### GetNonFlexibleChildren(self)

Returns all the ButtonPanel main sizer's children that are not flexible spacers.

### GetStyle(self)

Returns the ButtonPanel style.

### GetUseHelp(self)

Returns whether or not shortHelp and longHelp should be displayed.

### HasBarText(self)

Returns whether ButtonPanel has a main caption text or not.

### HitTest(self, pt)

HitTest method for ButtonPanel. Returns the button (if any) and a flag (if any).

  Overrides:
    `wx.Window.HitTest`

### IsStandard(self)

Returns whether ButtonPanel is aligned "Standard" (left/top) or not.

### IsVertical(self)

Returns whether ButtonPanel is vertically aligned or not.

### LayoutItems(self)

Layout the items using a different algorithm depending on the existance of the main caption.

### OnEraseBackground(self, event)

Handles the wx.EVT_ERASE_BACKGROUND event for ButtonPanel (does nothing).

### OnLeftDown(self, event)

Handles the wx.EVT_LEFT_DOWN event for ButtonPanel.

### OnLeftUp(self, event)

Handles the wx.EVT_LEFT_UP event for ButtonPanel.

### OnMouseEnterWindow(self, event)

Handles the wx.EVT_ENTER_WINDOW event for ButtonPanel.

### OnMouseLeave(self, event)

Handles the wx.EVT_LEAVE_WINDOW event for ButtonPanel.

### OnMouseMove(self, event)

Handles the wx.EVT_MOTION event for ButtonPanel.

### OnPaint(self, event)

Handles the wx.EVT_PAINT event for ButtonPanel.

### OnSize(self, event)

Handles the wx.EVT_SIZE event for ButtonPanel.

### OnStatusBarTimer(self)

Handles the timer expiring to delete the longHelp in the StatusBar.

### ReCreateSizer(self, text)

Recreates the ButtonPanel sizer accordingly to the alignment specified.

### RemoveAllButtons(self)

Remove all the buttons from ButtonPanel.

### RemoveAllSeparators(self)

Remove all the separators from ButtonPanel.

### RemoveHelp(self)

Removes the tooltips and statusbar help (if any) for a button.

### RemoveText(self)

Removes the main caption text.

### RepaintOldSelection(self)

Repaints the old selected/hovered button.

### SetAlignment(self, alignment)

Sets the button alignment (left, right, top, bottom).

### SetBarText(self, text)

Sets the main caption text (leave text="" for no text).

### SetBPArt(self, art)

Sets a new BPArt to ButtonPanel. Useful only if another BPArt class is used.

### SetStyle(self, style)

Sets ButtonPanel style.

### SetUseHelp(self, useHelp=True)

Sets whether or not shortHelp and longHelp should be displayed.

### SizeLayout(self, nonspacers, children)

Layout the items when no main caption exists.

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:10:55 2007 | http://epydoc.sf.net