Package wx :: Class AcceleratorTable
[frames | no frames]

Type AcceleratorTable

object --+    
         |    
    Object --+
             |
            AcceleratorTable


An accelerator table allows the application to specify a table of keyboard shortcuts for menus or other commands. On Windows, menu or button commands are supported; on GTK, only menu commands are supported.

The object wx.NullAcceleratorTable is defined to be a table with no data, and is the initial accelerator table for a window.

An accelerator takes precedence over normal processing and can be a convenient way to program some event handling. For example, you can use an accelerator table to make a hotkey generate an event no matter which window within a frame has the focus.

Foe example:

aTable = wx.AcceleratorTable([(wx.ACCEL_ALT,  ord('X'), exitID),
                              (wx.ACCEL_CTRL, ord('H'), helpID),
                              (wx.ACCEL_CTRL, ord('F'), findID),
                              (wx.ACCEL_NORMAL, wx.WXK_F3, findnextID)
                              ])
self.SetAcceleratorTable(aTable)

See Also: wx.AcceleratorEntry, wx.Window.SetAcceleratorTable

Method Summary
AcceleratorTable __init__(entries)
Construct an AcceleratorTable from a list of wx.AcceleratorEntry items or or of 3-tuples (flags, keyCode, cmdID)
  __del__(self)
  __repr__(self)
bool Ok(self)

Method Details

__init__(entries)
(Constructor)

Construct an AcceleratorTable from a list of wx.AcceleratorEntry items or or of 3-tuples (flags, keyCode, cmdID)
Returns:
AcceleratorTable
Overrides:
wx.Object.__init__

See Also: wx.AcceleratorEntry


Generated by Epydoc 2.1.20040428.rpd on Tue Apr 26 14:24:18 2005 http://epydoc.sf.net