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.WrapSizer.html below:

wx.WrapSizer — wxPython Phoenix 4.2.4a1 documentation

wx.WrapSizer¶

A wrap sizer lays out its items in a single line, like a box sizer – as long as there is space available in that direction.

Once all available space in the primary direction has been used, a new line is added and items are added there.

So a wrap sizer has a primary orientation for adding items, and adds lines as needed in the secondary direction.

Class Hierarchy¶

Inheritance diagram for class

WrapSizer

:

Methods Summary¶ Class API¶
class wx.WrapSizer(BoxSizer)¶

Possible constructors:

WrapSizer(orient=HORIZONTAL, flags=WRAPSIZER_DEFAULT_FLAGS) -> None

A wrap sizer lays out its items in a single line, like a box sizer as long as there is space available in that direction.


Methods¶
__init__(self, orient=HORIZONTAL, flags=WRAPSIZER_DEFAULT_FLAGS)¶

Constructor for a wx.WrapSizer.

orient determines the primary direction of the sizer (the most common case being HORIZONTAL ). The flags parameter can be a combination of the values EXTEND_LAST_ON_EACH_LINE which will cause the last item on each line to use any remaining space on that line and REMOVE_LEADING_SPACES which removes any spacer elements from the beginning of a row.

Both of these flags are on by default.

Parameters:
  • orient (int)

  • flags (int)

Return type:

None


CalcMin(self)¶

Implements the calculation of a box sizer’s minimal.

It is used internally only and must not be called by the user. Documented for information.

Return type:

wx.Size


InformFirstDirection(self, direction, size, availableOtherDir)¶

Not used by an application.

This is the mechanism by which sizers can inform sub-items of the first determined size component. The sub-item can then better determine its size requirements.

Returns True if the information was used (and the sub-item min size was updated).

Parameters:
  • direction (int)

  • size (int)

  • availableOtherDir (int)

Return type:

bool


IsSpaceItem(self, item)¶

Can be overridden in the derived classes to treat some normal items as spacers.

This method is used to determine whether the given item should be considered to be a spacer for the purposes of REMOVE_LEADING_SPACES implementation. By default only returns True for the real spacers.

Parameters:

item (wx.SizerItem)

Return type:

bool


RepositionChildren(self, minSize)¶

Method which must be overridden in the derived sizer classes.

The implementation should reposition the children using the current total size available to the sizer ( m_size ) and the size computed by the last call to CalcMin .

Parameters:

minSize (wx.Size)

Return type:

None

Added in version 4.1/wxWidgets-3.1.3: , before this version RecalcSizes() method not taking any arguments had to be overridden in the derived classes instead.


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