phoenix_title wx.ribbon.RibbonPage

Container for related ribbon panels, and a tab within a ribbon bar.

See also

wx.ribbon.RibbonBar

See also

wx.ribbon.RibbonPanel


class_hierarchy Class Hierarchy

Inheritance diagram for class RibbonPage:

method_summary Methods Summary

__init__

Default constructor.

AdjustRectToIncludeScrollButtons

Expand a rectangle of the page to include external scroll buttons (if any).

Create

Create a ribbon page in two-step ribbon page construction.

DismissExpandedPanel

Dismiss the current externally expanded panel, if there is one.

GetClassDefaultAttributes

GetIcon

Get the icon used for the page in the ribbon bar tab area (only displayed if the ribbon bar is actually showing icons).

GetMajorAxis

Get the direction in which ribbon panels are stacked within the page.

Realize

Perform a full re-layout of all panels on the page.

ScrollLines

Scroll the page by some amount up / down / left / right.

ScrollPixels

Scroll the page by a set number of pixels up / down / left / right.

ScrollSections

Scroll the page by an entire child section.

SetArtProvider

Set the art provider to be used.

SetSizeWithScrollButtonAdjustment

Set the size of the page and the external scroll buttons (if any).


property_summary Properties Summary

Icon

See GetIcon

MajorAxis

See GetMajorAxis


api Class API

class wx.ribbon.RibbonPage(RibbonControl)

Possible constructors:

RibbonPage()

RibbonPage(parent, id=ID_ANY, label="", icon=NullBitmap, style=0)

Container for related ribbon panels, and a tab within a ribbon bar.


Methods

__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self)

Default constructor.

With this constructor, Create should be called in order to create the ribbon page.



__init__ (self, parent, id=ID_ANY, label=””, icon=NullBitmap, style=0)

Constructs a ribbon page, which must be a child of a ribbon bar.

Parameters:





AdjustRectToIncludeScrollButtons(self, rect)

Expand a rectangle of the page to include external scroll buttons (if any).

When no scroll buttons are shown, has no effect.

Parameters:

rect (wx.Rect) – The rectangle to adjust. The width and height will not be reduced, and the x and y will not be increased.



Create(self, parent, id=ID_ANY, label="", icon=NullBitmap, style=0)

Create a ribbon page in two-step ribbon page construction.

Should only be called when the default constructor is used, and arguments have the same meaning as in the full constructor.

Parameters:
Return type:

bool



DismissExpandedPanel(self)

Dismiss the current externally expanded panel, if there is one.

When a ribbon panel automatically minimises, it can be externally expanded into a floating window. When the user clicks a button in such a panel, the panel should generally re-minimise. Event handlers for buttons on ribbon panels should call this method to achieve this behaviour.

Return type:

bool

Returns:

True if a panel was minimised, False otherwise.



static GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)
Parameters:

variant (WindowVariant) –

Return type:

VisualAttributes



GetIcon(self)

Get the icon used for the page in the ribbon bar tab area (only displayed if the ribbon bar is actually showing icons).

Return type:

Bitmap



GetMajorAxis(self)

Get the direction in which ribbon panels are stacked within the page.

This is controlled by the style of the containing wx.ribbon.RibbonBar, meaning that all pages within a bar will have the same major axis. As well as being the direction in which panels are stacked, it is also the axis in which scrolling will occur (when required).

Return type:

wx.Orientation

Returns:

wx.HORIZONTAL or wx.VERTICAL (never wx.BOTH).



Realize(self)

Perform a full re-layout of all panels on the page.

Should be called after panels are added to the page, or the sizing behaviour of a panel on the page changes (i.e. due to children being added to it). Usually called automatically when wx.ribbon.RibbonBar.Realize is called.

Will invoke wx.ribbon.RibbonPanel.Realize for all child panels.

Return type:

bool



ScrollLines(self, lines)

Scroll the page by some amount up / down / left / right.

When the page’s children are too big to fit in the onscreen area given to the page, scroll buttons will appear, and the page can be programmatically scrolled. Positive values of lines will scroll right or down, while negative values will scroll up or left (depending on the direction in which panels are stacked). A line is equivalent to a constant number of pixels.

Parameters:

lines (int) –

Return type:

bool

Returns:

True if the page scrolled at least one pixel in the given direction, False if it did not scroll.

See also

GetMajorAxis

See also

ScrollPixels

See also

ScrollSections



ScrollPixels(self, pixels)

Scroll the page by a set number of pixels up / down / left / right.

When the page’s children are too big to fit in the onscreen area given to the page, scroll buttons will appear, and the page can be programmatically scrolled. Positive values of lines will scroll right or down, while negative values will scroll up or left (depending on the direction in which panels are stacked).

Parameters:

pixels (int) –

Return type:

bool

Returns:

True if the page scrolled at least one pixel in the given direction, False if it did not scroll.

See also

GetMajorAxis

See also

ScrollLines

See also

ScrollSections



ScrollSections(self, sections)

Scroll the page by an entire child section.

The sections parameter value should be 1 or -1. This will scroll enough to uncover a partially visible child section or totally uncover the next child section that may not be visible at all.

Parameters:

sections (int) –

Return type:

bool

Returns:

True if the page scrolled at least one pixel in the given direction, False if it did not scroll.

New in version 2.9.5.

See also

ScrollPixels

See also

ScrollSections



SetArtProvider(self, art)

Set the art provider to be used.

Normally called automatically by wx.ribbon.RibbonBar when the page is created, or the art provider changed on the bar.

The new art provider will be propagated to the children of the page.

Parameters:

art (wx.ribbon.RibbonArtProvider) –



SetSizeWithScrollButtonAdjustment(self, x, y, width, height)

Set the size of the page and the external scroll buttons (if any).

When a page is too small to display all of its children, scroll buttons will appear (and if the page is sized up enough, they will disappear again). Slightly counter-intuitively, these buttons are created as siblings of the page rather than children of the page (to achieve correct cropping and paint ordering of the children and the buttons). When there are no scroll buttons, this function behaves the same as SetSize , however when there are scroll buttons, it positions them at the edges of the given area, and then calls SetSize with the remaining area.

This is provided as a separate function to SetSize rather than within the implementation of SetSize , as interacting algorithms may not expect SetSize to also set the size of siblings.

Parameters:
  • x (int) –

  • y (int) –

  • width (int) –

  • height (int) –


Properties

Icon

See GetIcon



MajorAxis

See GetMajorAxis