******** wx.Panel ******** Inheritance diagram for `wx.Panel`: | .. inheritance-diagram:: wx.Panel | Description =========== A panel is a window on which controls are placed. It is usually placed within a frame. It contains minimal extra functionality over and above its parent class wx.Window; its main purpose is to be similar in appearance and functionality to a dialog, but with the flexibility of having any window as a parent. .. tip:: if not all characters are being intercepted by your `OnKeyDown` or `OnChar` handler, it may be because you are using the ``wx.TAB_TRAVERSAL`` style, which grabs some keypresses for use by child controls. .. seealso:: `wx.Dialog `_ Derived From ^^^^^^^^^^^^^ * `wx.Window `_ * `wx.EvtHandler `_ * `wx.Object `_ Known Subclasses ^^^^^^^^^^^^^^^^ `wx.HtmlListBox `_, `wx.NotebookPage`, `wx.PreviewCanvas `_, `wx.PreviewControlBar `_, `wx.PyPanel `_, `wx.PyPreviewControlBar `_, `wx.PyScrolledWindow `_, `wx.ScrolledWindow `_, `wx.SimpleHtmlListBox `_, `wx.VListBox `_, `wx.VScrolledWindow `_ Remarks ^^^^^^^ By default, a panel has the same colouring as a dialog. Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `SetFocus <#SetFocus>`_ * `SetFocusIgnoringChildren <#SetFocusIgnoringChildren>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.TAB_TRAVERSAL|wx.NO_BORDER, name=wx.PanelNameStr) Constructor. **Parameters:** * `parent` (`wx.Window `_) * `id` (int) * `pos` (`wx.Point `_) * `size` (`wx.Size `_) * `style` (long) * `name` (string) | **Returns:** `wx.Panel `_ -------- .. method:: SetFocus() Overrides `wx.Window.SetFocus `_. This method uses the mix-in class `wx.ControlContainer `_ which manages the focus and ``TAB`` logic for controls which usually have child controls. In practice, if you call this method and the control has at least one child window, the focus will be given to the child window. .. seealso:: `wx.FocusEvent <../Events/wx.FocusEvent.html>`_, `wx.Window.SetFocus `_ -------- .. method:: SetFocusIgnoringChildren() In contrast to `SetFocus <#SetFocus>`_ (see above) this will set the focus to the panel even of there are child windows in the panel. This is only rarely needed.