File: wx.lib.agw.flatnotebook.FlatNotebook.txt

package info (click to toggle)
wxpython4.0 4.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 211,112 kB
  • sloc: cpp: 888,355; python: 223,130; makefile: 52,087; ansic: 45,780; sh: 3,012; xml: 1,534; perl: 264
file content (707 lines) | stat: -rw-r--r-- 31,148 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.agw.flatnotebook

.. highlight:: python



.. _wx.lib.agw.flatnotebook.FlatNotebook:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.flatnotebook.FlatNotebook**
==========================================================================================================================================

The :class:`FlatNotebook` is a full implementation of the :class:`Notebook`, and designed to be
a drop-in replacement for :class:`Notebook`. The API functions are similar so one can
expect the function to behave in the same way.



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>FlatNotebook</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.agw.flatnotebook.FlatNotebook_inheritance.png" alt="Inheritance diagram of FlatNotebook" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.Panel.html" title="wx.Panel" alt="" coords="95,315,171,344"/> <area shape="rect" id="node7" href="wx.lib.agw.flatnotebook.FlatNotebook.html" title="wx.lib.agw.flatnotebook.FlatNotebook" alt="" coords="5,392,261,421"/> <area shape="rect" id="node2" href="wx.Window.html" title="wx.Window" alt="" coords="89,237,177,267"/> <area shape="rect" id="node3" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="25,5,127,35"/> <area shape="rect" id="node4" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="77,83,188,112"/> <area shape="rect" id="node6" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="73,160,193,189"/> <area shape="rect" id="node5" href="wx.Object.html" title="wx.Object" alt="" coords="151,5,232,35"/> </map> 
   </p>

|


|appearance| Control Appearance
===============================

|

.. figure:: _static/images/widgets/fullsize/wxmsw/wx.lib.agw.flatnotebook.flatnotebook.png
   :alt: wxMSW
   :figclass: floatleft

   **wxMSW**


.. figure:: _static/images/widgets/fullsize/wxmac/../no_appearance.png
   :alt: wxMAC
   :figclass: floatright

   **wxMAC**


.. figure:: _static/images/widgets/fullsize/wxgtk/../no_appearance.png
   :alt: wxGTK
   :figclass: floatcenter

   **wxGTK**


|




|sub_classes| Known Subclasses
==============================

:class:`wx.lib.agw.flatnotebook.FlatNotebookCompatible`

|


|super_classes| Known Superclasses
==================================

:class:`wx.Panel`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.__init__`                           Default class constructor.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.AddPage`                            Adds a page to the :class:`FlatNotebook`.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.AdvanceSelection`                   Cycles through the tabs.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.AssignImageList`                    Assigns the image list for the page control.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.DeleteAllPages`                     Deletes all the pages in the :class:`FlatNotebook`.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.DeletePage`                         Deletes the specified page, and the associated window.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.DoGetBestSize`                      Gets the size which best suits the window: for a control, it would be the
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.EnableTab`                          Enables or disables a tab.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.EnsureVisible`                      Ensures that a tab is visible.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetActiveTabColour`                 Returns the active tab colour.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetActiveTabTextColour`             Get the active tab text colour.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetAGWWindowStyleFlag`              Returns the :class:`FlatNotebook` window style.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetBorderColour`                    Returns the border colour.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetCurrentPage`                     Returns the currently selected notebook page or ``None`` if none is selected.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetCustomPage`                      Returns a custom panel to show when there are no pages left in :class:`FlatNotebook`.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetEnabled`                         Returns whether a tab is enabled or not.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetGradientColourBorder`            Gets the tab border colour.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetGradientColourFrom`              Gets first gradient colour.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetGradientColourTo`                Gets second gradient colour.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetImageList`                       Returns the associated image list.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetNonActiveTabTextColour`          Returns the non active tabs text colour.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetPadding`                         Returns the amount of space around each page's icon and label, in pixels.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetPage`                            Returns the window at the given page position, or ``None``.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetPageBestSize`                    Return the page best size.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetPageCount`                       Returns the number of pages in the :class:`FlatNotebook` control.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetPageImage`                       Returns the image index for the given page.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetPageIndex`                       Returns the index at which the window is found.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetPageShapeAngle`                  Returns the angle associated to a tab.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetPageText`                        Returns the string for the given page.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetPageTextColour`                  Returns the tab text colour if it has been set previously, or ``None`` otherwise.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetPreviousSelection`               Returns the previous selection.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetSelection`                       Returns the currently selected page, or -1 if none was selected.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetTabArea`                         Returns the associated page.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetTabAreaColour`                   Returns the area behind the tabs colour.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.GetTileOrientation`                 Returns the orientation when on tiling mode. This method can return
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.HasAGWFlag`                         Returns whether a flag is present in the :class:`FlatNotebook` style.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.HideTabs`                           Hides the tabs.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.Init`                               Initializes all the class attributes.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.InsertPage`                         Inserts a new page at the specified position.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.OnDropTarget`                       Handles the drop action from a drag and drop operation.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.OnNavigationKey`                    Handles the ``wx.EVT_NAVIGATION_KEY`` event for :class:`FlatNotebook`.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.RemovePage`                         Deletes the specified page, without deleting the associated window.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetActiveTabColour`                 Sets the active tab colour.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetActiveTabTextColour`             Sets the text colour for the active tab.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetAGWWindowStyleFlag`              Sets the :class:`FlatNotebook` window style flags.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetAllPagesShapeAngle`              Sets the angle associated to all the tab.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetCustomPage`                      Sets a custom panel to show when there are no pages left in :class:`FlatNotebook`.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetGradientColourBorder`            Sets the tab border colour.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetGradientColourFrom`              Sets the starting colour for the gradient.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetGradientColours`                 Sets the gradient colours for the tab.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetGradientColourTo`                Sets the ending colour for the gradient.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetImageList`                       Sets the image list for the page control.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetNavigatorIcon`                   Set the icon used by the :class:`TabNavigatorWindow`.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetNonActiveTabTextColour`          Sets the non active tabs text colour.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetPadding`                         Sets the amount of space around each page's icon and label, in pixels.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetPageImage`                       Sets the image index for the given page.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetPageShapeAngle`                  Sets the angle associated to a tab.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetPageText`                        Sets the text for the given page.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetPageTextColour`                  Sets the tab text colour individually.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetRightClickMenu`                  Sets the popup menu associated to a right click on a tab.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetSelection`                       Sets the selection for the given page.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.SetTabAreaColour`                   Sets the area behind the tabs colour.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.ShowCustomPage`                     Hides the custom panel which is shown when there are no pages left in :class:`FlatNotebook`.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.ShowTabs`                           Shows the tabs if hidden previously.
:meth:`~wx.lib.agw.flatnotebook.FlatNotebook.Tile`                               Shows pages in column/row mode (one panel after the other in columns/rows).
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: FlatNotebook(wx.Panel)

   The :class:`FlatNotebook` is a full implementation of the :class:`Notebook`, and designed to be
   a drop-in replacement for :class:`Notebook`. The API functions are similar so one can
   expect the function to behave in the same way.

   .. method:: __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, agwStyle=0, name="FlatNotebook")

      Default class constructor.
      
      :param `parent`: the :class:`FlatNotebook` parent;
      :param `id`: an identifier for the control: a value of -1 is taken to mean a default;
      :param `pos`: the control position. A value of (-1, -1) indicates a default position,
       chosen by either the windowing system or wxPython, depending on platform;
      :param `size`: the control size. A value of (-1, -1) indicates a default size,
       chosen by either the windowing system or wxPython, depending on platform;
      :param `style`: the underlying :class:`Panel` window style;
      :param `agwStyle`: the AGW-specific window style. This can be a combination of the
       following bits:
      
       ================================ =========== ==================================================
       Window Styles                    Hex Value   Description
       ================================ =========== ==================================================
       ``FNB_VC71``                             0x1 Use Visual Studio 2003 (VC7.1) style for tabs.
       ``FNB_FANCY_TABS``                       0x2 Use fancy style - square tabs filled with gradient colouring.
       ``FNB_TABS_BORDER_SIMPLE``               0x4 Draw thin border around the page.
       ``FNB_NO_X_BUTTON``                      0x8 Do not display the 'X' button.
       ``FNB_NO_NAV_BUTTONS``                  0x10 Do not display the right/left arrows.
       ``FNB_MOUSE_MIDDLE_CLOSES_TABS``        0x20 Use the mouse middle button for cloing tabs.
       ``FNB_BOTTOM``                          0x40 Place tabs at bottom - the default is to place them at top.
       ``FNB_NODRAG``                          0x80 Disable dragging of tabs.
       ``FNB_VC8``                            0x100 Use Visual Studio 2005 (VC8) style for tabs.
       ``FNB_X_ON_TAB``                       0x200 Place 'X' close button on the active tab.
       ``FNB_BACKGROUND_GRADIENT``            0x400 Use gradients to paint the tabs background.
       ``FNB_COLOURFUL_TABS``                 0x800 Use colourful tabs (VC8 style only).
       ``FNB_DCLICK_CLOSES_TABS``            0x1000 Style to close tab using double click.
       ``FNB_SMART_TABS``                    0x2000 Use `Smart Tabbing`, like ``Alt`` + ``Tab`` on Windows.
       ``FNB_DROPDOWN_TABS_LIST``            0x4000 Use a dropdown menu on the left in place of the arrows.
       ``FNB_ALLOW_FOREIGN_DND``             0x8000 Allows drag 'n' drop operations between different :class:`FlatNotebook`.
       ``FNB_HIDE_ON_SINGLE_TAB``           0x10000 Hides the Page Container when there is one or fewer tabs.
       ``FNB_DEFAULT_STYLE``                0x10020 :class:`FlatNotebook` default style.
       ``FNB_FF2``                          0x20000 Use Firefox 2 style for tabs.
       ``FNB_NO_TAB_FOCUS``                 0x40000 Does not allow tabs to have focus.
       ``FNB_RIBBON_TABS``                  0x80000 Use the Ribbon Tabs style.
       ``FNB_HIDE_TABS``                   0x100000 Hides the Page Container allowing only keyboard navigation
       ``FNB_NAV_BUTTONS_WHEN_NEEDED``     0x200000 Hides the navigation left/right arrows if all tabs fit
       ================================ =========== ==================================================
      
      :param `name`: the window name.


   .. method:: AddPage(self, page, text, select=False, imageId=-1)

      Adds a page to the :class:`FlatNotebook`.
      
      :param `page`: specifies the new page;
      :param `text`: specifies the text for the new page;
      :param `select`: specifies whether the page should be selected;
      :param `imageId`: specifies the optional image index for the new page.
      
      :return: ``True`` if successful, ``False`` otherwise.


   .. method:: AdvanceSelection(self, forward=True)

      Cycles through the tabs.
      
      :param `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.


   .. method:: AssignImageList(self, imageList)

      Assigns the image list for the page control.
      
      :param `imageList`: an instance of :class:`wx.ImageList`.


   .. method:: DeleteAllPages(self)

      Deletes all the pages in the :class:`FlatNotebook`. 


   .. method:: DeletePage(self, page)

      Deletes the specified page, and the associated window.
      
      :param `page`: an integer specifying the new selected page.
      
      :note: The call to this function generates the page changing events.


   .. method:: DoGetBestSize(self)

      Gets the size which best suits the window: for a control, it would be the
      minimal size which doesn't truncate the control, for a panel - the same
      size as it would have after a call to `Fit()`.
      
      :note: Overridden from :class:`Panel`.


   .. method:: EnableTab(self, page, enabled=True)

      Enables or disables a tab.
      
      :param `page`: an integer specifying the page index;
      :param `enabled`: ``True`` to enable a tab, ``False`` to disable it.


   .. method:: EnsureVisible(self, page)

      Ensures that a tab is visible.
      
      :param `page`: an integer specifying the page index.


   .. method:: GetActiveTabColour(self)

      Returns the active tab colour. 


   .. method:: GetActiveTabTextColour(self)

      Get the active tab text colour. 


   .. method:: GetAGWWindowStyleFlag(self)

      Returns the :class:`FlatNotebook` window style.
      
      :see: :meth:`~FlatNotebook.SetAGWWindowStyleFlag` for a list of valid window styles.


   .. method:: GetBorderColour(self)

      Returns the border colour. 


   .. method:: GetCurrentPage(self)

      Returns the currently selected notebook page or ``None`` if none is selected. 


   .. method:: GetCustomPage(self)

      Returns a custom panel to show when there are no pages left in :class:`FlatNotebook`. 


   .. method:: GetEnabled(self, page)

      Returns whether a tab is enabled or not.
      
      :param `page`: an integer specifying the page index.


   .. method:: GetGradientColourBorder(self)

      Gets the tab border colour. 


   .. method:: GetGradientColourFrom(self)

      Gets first gradient colour. 


   .. method:: GetGradientColourTo(self)

      Gets second gradient colour. 


   .. method:: GetImageList(self)

      Returns the associated image list. 


   .. method:: GetNonActiveTabTextColour(self)

      Returns the non active tabs text colour. 


   .. method:: GetPadding(self)

      Returns the amount of space around each page's icon and label, in pixels. 


   .. method:: GetPage(self, page)

      Returns the window at the given page position, or ``None``. 


   .. method:: GetPageBestSize(self)

      Return the page best size. 


   .. method:: GetPageCount(self)

      Returns the number of pages in the :class:`FlatNotebook` control. 


   .. method:: GetPageImage(self, page)

      Returns the image index for the given page.
      
      :param `page`: an integer specifying the page index.


   .. method:: GetPageIndex(self, win)

      Returns the index at which the window is found.
      
      :param `win`: an instance of :class:`wx.Window`.


   .. method:: GetPageShapeAngle(self, page_index)

      Returns the angle associated to a tab.
      
      :param `page_index`: the index of the tab for which we wish to get the shape angle.


   .. method:: GetPageText(self, page)

      Returns the string for the given page.
      
      :param `page`: an integer specifying the page index.


   .. method:: GetPageTextColour(self, page)

      Returns the tab text colour if it has been set previously, or ``None`` otherwise.
      
      :param `page`: an integer specifying the page index.


   .. method:: GetPreviousSelection(self)

      Returns the previous selection. 


   .. method:: GetSelection(self)

      Returns the currently selected page, or -1 if none was selected. 


   .. method:: GetTabArea(self)

      Returns the associated page. 


   .. method:: GetTabAreaColour(self)

      Returns the area behind the tabs colour. 


   .. method:: GetTileOrientation(self)

      Returns the orientation when on tiling mode. This method can return
      ``wx.VERTICAL`` when the panels are vertically stacked, ``wx.HORIZONTAL``
      when they are horizontally stacked panels or ``None`` when there is no
      stacking and :class:`FlatNotebook` behaves like a normal notebook.


   .. method:: HasAGWFlag(self, flag)

      Returns whether a flag is present in the :class:`FlatNotebook` style.
      
      :param `flag`: one of the possible :class:`FlatNotebook` window styles.
      
      :see: :meth:`~FlatNotebook.SetAGWWindowStyleFlag` for a list of possible window style flags.


   .. method:: HideTabs(self)

      Hides the tabs. 


   .. method:: Init(self)

      Initializes all the class attributes. 


   .. method:: InsertPage(self, indx, page, text, select=True, imageId=-1)

      Inserts a new page at the specified position.
      
      :param `indx`: specifies the position of the new page;
      :param `page`: specifies the new page;
      :param `text`: specifies the text for the new page;
      :param `select`: specifies whether the page should be selected;
      :param `imageId`: specifies the optional image index for the new page.
      
      :return: ``True`` if successful, ``False`` otherwise.


   .. method:: OnDropTarget(self, x, y, nTabPage, wnd_oldContainer)

      Handles the drop action from a drag and drop operation.
      
      :param `x`: the x position of the drop action;
      :param `y`: the y position of the drop action;
      :param `nTabPage`: the index of the tab being dropped;
      :param `wnd_oldContainer`: the :class:`FlatNotebook` to which the dropped tab previously
       belonged to.


   .. method:: OnNavigationKey(self, event)

      Handles the ``wx.EVT_NAVIGATION_KEY`` event for :class:`FlatNotebook`.
      
      :param `event`: a :class:`NavigationKeyEvent` event to be processed.


   .. method:: RemovePage(self, page)

      Deletes the specified page, without deleting the associated window.
      
      :param `page`: an integer specifying the page index.


   .. method:: SetActiveTabColour(self, colour)

      Sets the active tab colour.
      
      :param `colour`: a valid :class:`wx.Colour` object or any typemap supported by wxWidgets/wxPython
       to generate a colour (i.e., a hex string, a colour name, a 3 or 4 integer tuple).


   .. method:: SetActiveTabTextColour(self, textColour)

      Sets the text colour for the active tab.
      
      :param `textColour`: a valid :class:`wx.Colour` object or any typemap supported by wxWidgets/wxPython
       to generate a colour (i.e., a hex string, a colour name, a 3 or 4 integer tuple).


   .. method:: SetAGWWindowStyleFlag(self, agwStyle)

      Sets the :class:`FlatNotebook` window style flags.
      
      :param `agwStyle`: the AGW-specific window style. This can be a combination of the
       following bits:
      
       ================================ =========== ==================================================
       Window Styles                    Hex Value   Description
       ================================ =========== ==================================================
       ``FNB_VC71``                             0x1 Use Visual Studio 2003 (VC7.1) style for tabs.
       ``FNB_FANCY_TABS``                       0x2 Use fancy style - square tabs filled with gradient colouring.
       ``FNB_TABS_BORDER_SIMPLE``               0x4 Draw thin border around the page.
       ``FNB_NO_X_BUTTON``                      0x8 Do not display the 'X' button.
       ``FNB_NO_NAV_BUTTONS``                  0x10 Do not display the right/left arrows.
       ``FNB_MOUSE_MIDDLE_CLOSES_TABS``        0x20 Use the mouse middle button for cloing tabs.
       ``FNB_BOTTOM``                          0x40 Place tabs at bottom - the default is to place them at top.
       ``FNB_NODRAG``                          0x80 Disable dragging of tabs.
       ``FNB_VC8``                            0x100 Use Visual Studio 2005 (VC8) style for tabs.
       ``FNB_X_ON_TAB``                       0x200 Place 'X' close button on the active tab.
       ``FNB_BACKGROUND_GRADIENT``            0x400 Use gradients to paint the tabs background.
       ``FNB_COLOURFUL_TABS``                 0x800 Use colourful tabs (VC8 style only).
       ``FNB_DCLICK_CLOSES_TABS``            0x1000 Style to close tab using double click.
       ``FNB_SMART_TABS``                    0x2000 Use `Smart Tabbing`, like ``Alt`` + ``Tab`` on Windows.
       ``FNB_DROPDOWN_TABS_LIST``            0x4000 Use a dropdown menu on the left in place of the arrows.
       ``FNB_ALLOW_FOREIGN_DND``             0x8000 Allows drag 'n' drop operations between different :class:`FlatNotebook`.
       ``FNB_HIDE_ON_SINGLE_TAB``           0x10000 Hides the Page Container when there is one or fewer tabs.
       ``FNB_DEFAULT_STYLE``                0x10020 :class:`FlatNotebook` default style.
       ``FNB_FF2``                          0x20000 Use Firefox 2 style for tabs.
       ``FNB_NO_TAB_FOCUS``                 0x40000 Does not allow tabs to have focus.
       ``FNB_RIBBON_TABS``                  0x80000 Use the Ribbon Tabs style.
       ``FNB_HIDE_TABS``                   0x100000 Hides the Page Container allowing only keyboard navigation
       ``FNB_NAV_BUTTONS_WHEN_NEEDED``     0x200000 Hides the navigation left/right arrows if all tabs fit
       ================================ =========== ==================================================


   .. method:: SetAllPagesShapeAngle(self, angle)

      Sets the angle associated to all the tab.
      
      :param `angle`: the new shape angle for the tab (must be less than 15 degrees).


   .. method:: SetCustomPage(self, panel)

      Sets a custom panel to show when there are no pages left in :class:`FlatNotebook`.
      
      :param `panel`: any subclass of :class:`wx.Window` will do, as long as it is suitable
       to be used as a notebook page. Examples include :class:`Panel`, :class:`ScrolledWindow`,
       and so on.


   .. method:: SetGradientColourBorder(self, border)

      Sets the tab border colour.
      
      :param `border`: the border colour, an instance of :class:`wx.Colour`.


   .. method:: SetGradientColourFrom(self, fr)

      Sets the starting colour for the gradient.
      
      :param `fr`: the first gradient colour, an instance of :class:`wx.Colour`.


   .. method:: SetGradientColours(self, fr, to, border)

      Sets the gradient colours for the tab.
      
      :param `fr`: the first gradient colour, an instance of :class:`wx.Colour`;
      :param `to`: the second gradient colour, an instance of :class:`wx.Colour`;
      :param `border`: the border colour, an instance of :class:`wx.Colour`.


   .. method:: SetGradientColourTo(self, to)

      Sets the ending colour for the gradient.
      
      :param `to`: the second gradient colour, an instance of :class:`wx.Colour`;


   .. method:: SetImageList(self, imageList)

      Sets the image list for the page control.
      
      :param `imageList`: an instance of :class:`wx.ImageList`.


   .. method:: SetNavigatorIcon(self, bmp)

      Set the icon used by the :class:`TabNavigatorWindow`.
      
      :param `bmp`: a valid :class:`wx.Bitmap` object.


   .. method:: SetNonActiveTabTextColour(self, colour)

      Sets the non active tabs text colour.
      
      :param `colour`: a valid :class:`wx.Colour` object or any typemap supported by wxWidgets/wxPython
       to generate a colour (i.e., a hex string, a colour name, a 3 or 4 integer tuple).


   .. method:: SetPadding(self, padding)

      Sets the amount of space around each page's icon and label, in pixels.
      
      :param `padding`: the amount of space around each page's icon and label,
       in pixels.
      
      :note: Only the horizontal padding is considered.


   .. method:: SetPageImage(self, page, image)

      Sets the image index for the given page.
      
      :param `page`: an integer specifying the page index;
      :param `image`: an index into the image list which was set with :meth:`~FlatNotebook.SetImageList`.


   .. method:: SetPageShapeAngle(self, page_index, angle)

      Sets the angle associated to a tab.
      
      :param `page_index`: the index of the tab for which we wish to get the shape angle;
      :param `angle`: the new shape angle for the tab (must be less than 15 degrees).


   .. method:: SetPageText(self, page, text)

      Sets the text for the given page.
      
      :param `page`: an integer specifying the page index;
      :param `text`: the new tab label.


   .. method:: SetPageTextColour(self, page, colour)

      Sets the tab text colour individually.
      
      :param `page`: an integer specifying the page index;
      :param `colour`: a valid :class:`wx.Colour` object or any typemap supported by wxWidgets/wxPython
       to generate a colour (i.e., a hex string, a colour name, a 3 or 4 integer tuple). You can
       pass ``None`` or :class:`NullColour` to return to the default page text colour.


   .. method:: SetRightClickMenu(self, menu)

      Sets the popup menu associated to a right click on a tab.
      
      :param `menu`: an instance of :class:`wx.Menu`.


   .. method:: SetSelection(self, page)

      Sets the selection for the given page.
      
      :param `page`: an integer specifying the new selected page.
      
      :note: The call to this function **does not** generate the page changing events.


   .. method:: SetTabAreaColour(self, colour)

      Sets the area behind the tabs colour.
      
      :param `colour`: a valid :class:`wx.Colour` object or any typemap supported by wxWidgets/wxPython
       to generate a colour (i.e., a hex string, a colour name, a 3 or 4 integer tuple).


   .. method:: ShowCustomPage(self, show=True)

      Hides the custom panel which is shown when there are no pages left in :class:`FlatNotebook`. 


   .. method:: ShowTabs(self)

      Shows the tabs if hidden previously. 


   .. method:: Tile(self, orient=None)

      Shows pages in column/row mode (one panel after the other in columns/rows).
      
      :param `orient`: this parameter represents the orientation of the stacked
       panels. Pass ``wx.VERTICAL`` to get vertically stacked panels, ``wx.HORIZONTAL``
       to get horizontally stacked panels or ``None`` to return to the default
       :class:`FlatNotebook` behaviour with tabs.