PageContainer¶This class acts as a container for the pages you add to FlatNotebook.
Methods Summary¶| __init__ | Default class constructor. |
| AddPage | Adds a page to the PageContainer. |
| AdvanceSelection | Cycles through the tabs. |
| AssignImageList | Assigns the image list for the PageContainer. |
| CanFitToScreen | Returns wheter a tab can fit in the left space in the screen or not. |
| ClearAGWFlag | Deletes a flag from the FlatNotebook style. |
| DeleteAllPages | Deletes all the pages in the PageContainer. |
| DeletePage | Delete the specified page from PageContainer. |
| DoDeletePage | Does the actual page deletion. |
| DoSetSelection | Does the actual selection of a page. |
| DrawDragHint | Draws small arrow at the place that the tab will be placed. |
| EnableTab | Enables or disables a tab. |
| FireEvent | Fires the EVT_FLATNOTEBOOK_PAGE_CHANGING and EVT_FLATNOTEBOOK_PAGE_CHANGED |
| GetAGWWindowStyleFlag | Returns the FlatNotebook window style. |
| GetEnabled | Returns whether a tab is enabled or not. |
| GetImageList | Returns the image list for the page control. |
| GetLastVisibleTab | Returns the last visible tab in the tab area. |
| GetNumOfVisibleTabs | Returns the number of visible tabs. |
| GetNumTabsCanScrollLeft | Returns the number of tabs than can be scrolled left. |
| GetPageCount | Returns the number of tabs in the FlatNotebook control. |
| GetPageImage | Returns the image index associated to a page. |
| GetPageText | Returns the tab caption of the page. |
| GetPageTextColour | Returns the tab text colour if it has been set previously, or None otherwise. |
| GetSelection | Returns the current selected page. |
| GetSingleLineBorderColour | Returns the colour for the single line border. |
| HasAGWFlag | Returns whether a flag is present in the FlatNotebook style. |
| HitTest | HitTest method for PageContainer. |
| InsertPage | Inserts a new page at the specified position. |
| IsDefaultTabs | Returns whether a tab has a default style. |
| IsMouseHovering | Returns whether or not the mouse is hovering over this page’s tab |
| IsTabVisible | Returns whether a tab is visible or not. |
| MoveTabPage | Moves a tab inside the same FlatNotebook. |
| OnDropTarget | Handles the drop action from a drag and drop operation. |
| OnEraseBackground | Handles the wx.EVT_ERASE_BACKGROUND event for PageContainer. |
| OnKeyDown | Handles the wx.EVT_KEY_DOWN event for PageContainer. |
| OnKillFocus | Handles the wx.EVT_KILL_FOCUS event for PageContainer. |
| OnLeftDClick | Handles the wx.EVT_LEFT_DCLICK event for PageContainer. |
| OnLeftDown | Handles the wx.EVT_LEFT_DOWN event for PageContainer. |
| OnLeftUp | Handles the wx.EVT_LEFT_UP event for PageContainer. |
| OnMiddleDown | Handles the wx.EVT_MIDDLE_DOWN event for PageContainer. |
| OnMouseEnterWindow | Handles the wx.EVT_ENTER_WINDOW event for PageContainer. |
| OnMouseLeave | Handles the wx.EVT_LEAVE_WINDOW event for PageContainer. |
| OnMouseMove | Handles the wx.EVT_MOTION event for PageContainer. |
| OnMouseWheel | Handles the wx.EVT_MOUSEWHEEL event for PageContainer. |
| OnPaint | Handles the wx.EVT_PAINT event for PageContainer. |
| OnRightDown | Handles the wx.EVT_RIGHT_DOWN event for PageContainer. |
| OnSetFocus | Handles the wx.EVT_SET_FOCUS event for PageContainer. |
| OnSize | Handles the wx.EVT_SIZE event for PageContainer. |
| OnTabMenuSelection | Handles the wx.EVT_MENU event for PageContainer. |
| PopupTabsMenu | Pops up the menu activated with the drop down arrow in the navigation area. |
| RotateLeft | Scrolls tabs to the left by bulk of 5 tabs. |
| RotateRight | Scrolls tabs to the right by bulk of 5 tabs. |
| SetAGWWindowStyleFlag | Sets the FlatNotebook window style. |
| SetFocusedPage | Sets/Unsets the focus on the appropriate page. |
| SetImageList | Sets the image list for the PageContainer. |
| SetPageImage | Sets the image index for the given page. |
| SetPageText | Sets the tab caption of the page. |
| SetPageTextColour | Sets the tab text colour individually. |
| SetSelection | Sets the selected page. |
| ShowTabTooltip | Shows a tab tooltip. |
| TabHasImage | Returns whether a tab has an associated image index or not. |
| _ReShow | Handles the redraw of the tabs when the FNB_HIDE_ON_SINGLE_TAB has been removed. |
Class API¶This class acts as a container for the pages you add to FlatNotebook.
Default class constructor.
Used internally, do not call it in your code!
| Parameters: |
|
|---|
Adds a page to the PageContainer.
| Parameters: |
|
|---|
Cycles through the tabs.
| Parameters: | forward – if True, the selection is advanced in ascending order (to the right), otherwise the selection is advanced in descending order. |
|---|
Note
The call to this function generates the page changing events.
Assigns the image list for the PageContainer.
| Parameters: | imageList – an instance of wx.ImageList. |
|---|
Returns wheter a tab can fit in the left space in the screen or not.
| Parameters: | page – an integer specifying the page index. |
|---|
Deletes a flag from the FlatNotebook style.
| Parameters: | flag – one of the possible FlatNotebook window styles. |
|---|
See also
FlatNotebook.SetAGWWindowStyleFlag() for a list of possible window style flags.
Deletes all the pages in the PageContainer.
Delete the specified page from PageContainer.
| Parameters: | page – an integer specifying the page index. |
|---|
Does the actual page deletion.
| Parameters: | page – an integer specifying the page index. |
|---|
Does the actual selection of a page.
| Parameters: | page – an integer specifying the page index. |
|---|
Enables or disables a tab.
| Parameters: |
|
|---|
Fires the EVT_FLATNOTEBOOK_PAGE_CHANGING and EVT_FLATNOTEBOOK_PAGE_CHANGED events called from other methods (from menu selection or Smart Tabbing).
This is an utility function.
| Parameters: | selection – the new selection inside FlatNotebook. |
|---|
Returns the FlatNotebook window style.
See also
The FlatNotebook.__init__() method for the agwStyle parameter description.
Returns whether a tab is enabled or not.
| Parameters: | page – an integer specifying the page index. |
|---|
Returns the number of tabs in the FlatNotebook control.
Returns the image index associated to a page.
| Parameters: | page – an integer specifying the page index. |
|---|
Returns the tab caption of the page.
| Parameters: | page – an integer specifying the page index. |
|---|
Returns the tab text colour if it has been set previously, or None otherwise.
| Parameters: | page – an integer specifying the page index. |
|---|
Returns whether a flag is present in the FlatNotebook style.
| Parameters: | flag – one of the possible FlatNotebook window styles. |
|---|
See also
FlatNotebook.SetAGWWindowStyleFlag() for a list of possible window style flags.
HitTest method for PageContainer.
| Parameters: | pt – an instance of wx.Point, to test for hits. | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Returns: | The hit test flag (if any) and the hit page index (if any). The return
value can be one of the following bits:
|
Inserts a new page at the specified position.
| Parameters: |
|
|---|
Returns whether or not the mouse is hovering over this page’s tab
| Parameters: | page – an integer specifying the page index. |
|---|
Returns whether a tab is visible or not.
| Parameters: | page – an integer specifying the page index. |
|---|
Moves a tab inside the same FlatNotebook.
| Parameters: |
|
|---|
Handles the drop action from a drag and drop operation.
| Parameters: |
|
|---|
Handles the wx.EVT_ERASE_BACKGROUND event for PageContainer.
| Parameters: | event – a wx.EraseEvent event to be processed. |
|---|
Note
This method is intentionally empty to reduce flicker.
Handles the wx.EVT_KEY_DOWN event for PageContainer.
| Parameters: | event – a wx.KeyEvent event to be processed. |
|---|
Note
When the PageContainer has the focus tabs can be changed with the left/right arrow keys.
Handles the wx.EVT_KILL_FOCUS event for PageContainer.
| Parameters: | event – a wx.FocusEvent event to be processed. |
|---|
Handles the wx.EVT_LEFT_DCLICK event for PageContainer.
| Parameters: | event – a wx.MouseEvent event to be processed. |
|---|
Handles the wx.EVT_LEFT_DOWN event for PageContainer.
| Parameters: | event – a wx.MouseEvent event to be processed. |
|---|
Handles the wx.EVT_LEFT_UP event for PageContainer.
| Parameters: | event – a wx.MouseEvent event to be processed. |
|---|
Handles the wx.EVT_MIDDLE_DOWN event for PageContainer.
| Parameters: | event – a wx.MouseEvent event to be processed. |
|---|
Handles the wx.EVT_ENTER_WINDOW event for PageContainer.
| Parameters: | event – a wx.MouseEvent event to be processed. |
|---|
Handles the wx.EVT_LEAVE_WINDOW event for PageContainer.
| Parameters: | event – a wx.MouseEvent event to be processed. |
|---|
Handles the wx.EVT_MOTION event for PageContainer.
| Parameters: | event – a wx.MouseEvent event to be processed. |
|---|
Handles the wx.EVT_MOUSEWHEEL event for PageContainer.
| Parameters: | event – a wx.MouseEvent event to be processed. |
|---|
Handles the wx.EVT_PAINT event for PageContainer.
| Parameters: | event – a wx.PaintEvent event to be processed. |
|---|
Handles the wx.EVT_RIGHT_DOWN event for PageContainer.
| Parameters: | event – a wx.MouseEvent event to be processed. |
|---|
Handles the wx.EVT_SET_FOCUS event for PageContainer.
| Parameters: | event – a wx.FocusEvent event to be processed. |
|---|
Handles the wx.EVT_SIZE event for PageContainer.
| Parameters: | event – a wx.SizeEvent event to be processed. |
|---|
Handles the wx.EVT_MENU event for PageContainer.
| Parameters: | event – a wx.MenuEvent event to be processed. |
|---|
Pops up the menu activated with the drop down arrow in the navigation area.
Sets the FlatNotebook window style.
| Parameters: | agwStyle – the new FlatNotebook window style. |
|---|
See also
The FlatNotebook.__init__() method for the agwStyle parameter description.
Sets/Unsets the focus on the appropriate page.
| Parameters: | pageIndex – an integer specifying the page index. If pageIndex is defaulted to -1, we have lost focus and no focus indicator is drawn. |
|---|
Sets the image list for the PageContainer.
| Parameters: | imageList – an instance of wx.ImageList. |
|---|
Sets the image index for the given page.
| Parameters: |
|
|---|
Sets the tab caption of the page.
| Parameters: |
|
|---|
Sets the tab text colour individually.
| Parameters: |
|
|---|
Sets the selected page.
| Parameters: | page – an integer specifying the page index. |
|---|
Shows a tab tooltip.
| Parameters: | tabIdx – an integer specifying the page index. |
|---|