wx.Window.ChildrenRepositioningGuard¶
Helper for ensuring EndRepositioningChildren
is called correctly.
This class wraps the calls to BeginRepositioningChildren
and EndRepositioningChildren
by performing the former in its constructor and the latter in its destructor if, and only if, the first call returned True
. This is the simplest way to call these methods and if this class is created as a local variable, it also ensures that EndRepositioningChildren
is correctly called (or not) on scope exit, so its use instead of calling these methods manually is highly recommended.
Added in version 2.9.5.
Class Hierarchy¶
Methods Summary¶
Constructor calls |
Class API¶
- class wx.Window.ChildrenRepositioningGuard(object)¶
Possible constructors:
ChildrenRepositioningGuard(win) -> None
Helper for ensuring EndRepositioningChildren() is called correctly.
Methods¶
- __init__(self, win)¶
Constructor calls
wx.Window.BeginRepositioningChildren
.- Parameters:
win (wx.Window) – The window to call
BeginRepositioningChildren
on. If it isNone
, nothing is done.- Return type:
None