A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://wxpython.org/Phoenix/docs/html/wx.Panel.html below:

wx.Panel — wxPython Phoenix 4.2.4a1 documentation

wx.Panel¶

A panel is a window on which controls are placed.

It is usually placed within a frame. Its main feature over its parent class wx.Window is code for handling child windows and TAB traversal, which is implemented natively if possible (e.g. in wxGTK) or by wxWidgets itself otherwise.

Events Emitted by this Class¶

Handlers bound for the following event types will receive a wx.NavigationKeyEvent parameter.

Note

By default, a panel has the same colouring as a dialog.

Note

Tab traversal is implemented through an otherwise undocumented intermediate ControlContainer class from which any class can derive in addition to the normal wx.Window base class. Please see /containr.h and /panel.h to find out how this is achieved.

Note

if not all characters are being intercepted by your OnKeyDown or OnChar handler, it may be because you are using the TAB_TRAVERSAL style, which grabs some keypresses for use by child controls.

Class Hierarchy¶

Inheritance diagram for class

Panel

:

Known Subclasses¶

AddRemoveCtrl , wx.aui.AuiMDIChildFrame, wx.adv.EditableListBox, wx.HScrolledWindow, wx.HVScrolledWindow, wx.PreviewControlBar, wx.propgrid.PropertyGridManager, wx.RearrangeCtrl, wx.VScrolledWindow, wx.adv.WizardPage

Methods Summary¶ Class API¶
class wx.Panel(Window)¶

Possible constructors:

Panel() -> None

Panel(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize,
      style=TAB_TRAVERSAL, name=PanelNameStr) -> None

A panel is a window on which controls are placed.


Methods¶
__init__(self, *args, **kw)¶

Overloaded Implementations:

__init__ (self)

Default constructor.

Return type:

None

__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=TAB_TRAVERSAL, name=PanelNameStr)

Constructor.

Parameters:
  • parent (wx.Window) – The parent window.

  • id (wx.WindowID) – An identifier for the panel. ID_ANY is taken to mean a default.

  • pos (wx.Point) – The panel position. The value wx.DefaultPosition indicates a default position, chosen by either the windowing system or wxWidgets, depending on platform.

  • size (wx.Size) – The panel size. The value wx.DefaultSize indicates a default size, chosen by either the windowing system or wxWidgets, depending on platform.

  • style (long) – The window style. See wx.Panel.

  • name (string) – Window name.

Return type:

None



AcceptsFocus(self)¶

This method is overridden from wx.Window.AcceptsFocus and returns True only if there is no child window in the panel which can accept the focus.

This is reevaluated each time a child window is added or removed from the panel.

Return type:

bool


Create(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=TAB_TRAVERSAL, name=PanelNameStr)¶

Used for two-step panel construction.

See wx.Panel for details.

Parameters:
Return type:

bool


static GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)¶
Parameters:

variant (WindowVariant)

Return type:

wx.VisualAttributes


InitDialog(self)¶

Sends a wx.InitDialogEvent, which in turn transfers data to the dialog via validators.

Return type:

None


Layout(self)¶

See wx.Window.SetAutoLayout : when auto layout is on, this function gets called automatically when the window is resized.

Return type:

bool


SetFocus(self)¶

Overrides wx.Window.SetFocus .

This method uses the (undocumented) mix-in class 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.

Return type:

None


SetFocusIgnoringChildren(self)¶

In contrast to SetFocus (see above) this will set the focus to the panel even if there are child windows in the panel.

This is only rarely needed.

Return type:

None


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4