File: wx.Frame.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 (962 lines) | stat: -rw-r--r-- 26,250 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
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
.. 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



.. _wx.Frame:

==========================================================================================================================================
|phoenix_title|  **wx.Frame**
==========================================================================================================================================

A frame is a window whose size and position can (usually) be changed by the user.          

It usually has thick borders and a title bar, and can optionally contain a menu bar, toolbar and status bar. A frame can contain any window that is not a frame or dialog. 

A frame that has a status bar and toolbar, created via the :meth:`~wx.Frame.CreateStatusBar`  and :meth:`~wx.Frame.CreateToolBar`  functions, manages these windows and adjusts the value returned by :meth:`~wx.Frame.GetClientSize`  to reflect the remaining size available to application windows. 





|phoenix_title| Default event processing
========================================

:ref:`wx.Frame`  processes the following events: 

-  ``wxEVT_SIZE:``   if the frame has exactly one child window, not counting the status and toolbar, this child is resized to take the entire frame client area. If two or more windows are present, they should be laid out explicitly either by manually handling   ``wxEVT_SIZE``   or using sizers;   
-  ``wxEVT_MENU_HIGHLIGHT:``   the default implementation displays the help string associated with the selected item in the first pane of the status bar, if there is one. 




.. _Frame-styles:

|styles| Window Styles
================================

This class supports the following styles:   

- ``wx.DEFAULT_FRAME_STYLE``: Defined as ``wx.MINIMIZE_BOX`` | ``wx.MAXIMIZE_BOX`` | ``wx.RESIZE_BORDER`` | ``wx.SYSTEM_MENU`` | ``wx.CAPTION`` | ``wx.CLOSE_BOX`` | ``wx.CLIP_CHILDREN``.  
- ``wx.ICONIZE``: Display the frame iconized (minimized). Windows only.  
- ``wx.CAPTION``: Puts a caption on the frame. Notice that this flag is required by ``wx.MINIMIZE_BOX``, ``wx.MAXIMIZE_BOX`` and ``wx.CLOSE_BOX`` on most systems as the corresponding buttons cannot be shown if the window has no title bar at all. I.e. if ``wx.CAPTION`` is not specified those styles would be simply ignored.  
- ``wx.MINIMIZE``: Identical to ``wx.ICONIZE``. Windows only.  
- ``wx.MINIMIZE_BOX``: Displays a minimize box on the frame.  
- ``wx.MAXIMIZE``: Displays the frame maximized. Windows and GTK+ only.  
- ``wx.MAXIMIZE_BOX``: Displays a maximize box on the frame. Notice that under wxGTK ``wx.RESIZE_BORDER`` must be used as well or this style is ignored.  
- ``wx.CLOSE_BOX``: Displays a close box on the frame.  
- ``wx.STAY_ON_TOP``: Stay on top of all other windows, see also ``wx.FRAME_FLOAT_ON_PARENT``.  
- ``wx.SYSTEM_MENU``: Displays a system menu containing the list of various windows commands in the window title bar. Unlike ``wx.MINIMIZE_BOX``, ``wx.MAXIMIZE_BOX`` and ``wx.CLOSE_BOX`` styles this style can be used without ``wx.CAPTION``, at least under Windows, and makes the system menu available without showing it on screen in this case. However it is recommended to only use it together with ``wx.CAPTION`` for consistent behaviour under all platforms.  
- ``wx.RESIZE_BORDER``: Displays a resizable border around the window.  
- ``wx.FRAME_TOOL_WINDOW``: Causes a frame with a small title bar to be created; the frame does not appear in the taskbar under Windows or GTK+.  
- ``wx.FRAME_NO_TASKBAR``: Creates an otherwise normal frame but it does not appear in the taskbar under Windows or GTK+ (note that it will minimize to the desktop window under Windows which may seem strange to the users and thus it might be better to use this style only without ``wx.MINIMIZE_BOX`` style). In wxGTK, the flag is respected only if the window manager supports ``_NET_WM_STATE_SKIP_TASKBAR`` hint.  
- ``wx.FRAME_FLOAT_ON_PARENT``: The frame will always be on top of its parent (unlike ``wx.STAY_ON_TOP``). A frame created with this style must have a non-NULL parent.  
- ``wx.FRAME_SHAPED``: Windows with this style are allowed to have their shape changed with the :meth:`~wx.Frame.SetShape`  method.  

The default frame style is for normal, resizable frames. To create a frame which cannot be resized by user, you may use the following combination of styles:
::

            style = wx.DEFAULT_FRAME_STYLE & ~(wx.RESIZE_BORDER | wx.MAXIMIZE_BOX)



.. _Frame-extra-styles:

|extra_styles| Window Extra Styles
==================================

See also the :ref:`Window Styles <window styles>`. This class supports the following extra styles:   

- ``wx.FRAME_EX_CONTEXTHELP``: Under Windows, puts a query button on the caption. When pressed, Windows will go into a context-sensitive help mode and wxWidgets will send a  ``wxEVT_HELP``   event if the user clicked on an application window. Note that this is an extended style and must be set by calling SetExtraStyle before Create is called (two-step construction). You cannot use this style together with ``wx.MAXIMIZE_BOX`` or ``wx.MINIMIZE_BOX``, so you should use ``wx.DEFAULT_FRAME_STYLE`` ~ (wx``wx.MINIMIZE_BOX`` | ``wx.MAXIMIZE_BOX``) for the frames having this style (the dialogs don't have a minimize or a maximize box by default)   
- ``wx.FRAME_EX_METAL``: On Mac OS X, frames with this style will be shown with a metallic look. This is an extra style.  




.. _Frame-events:

|events| Events Emitted by this Class
=====================================

Event macros for events emitted by this class:   

- EVT_CLOSE: Process a  ``wxEVT_CLOSE_WINDOW``   event when the frame is being closed by the user or programmatically (see  :meth:`wx.Window.Close` ). The user may generate this event clicking the close button (typically the 'X' on the top-right of the title bar) if it's present (see the  ``CLOSE_BOX``   style). See  :ref:`wx.CloseEvent`.  
- EVT_ICONIZE: Process a  ``wxEVT_ICONIZE``   event. See  :ref:`wx.IconizeEvent`.  
- EVT_MENU_OPEN: A menu is about to be opened. See :ref:`wx.MenuEvent`.  
- EVT_MENU_CLOSE: A menu has been just closed. See :ref:`wx.MenuEvent`.  
- EVT_MENU_HIGHLIGHT: The menu item with the specified id has been highlighted: used to show help prompts in the status bar by :ref:`wx.Frame`. See :ref:`wx.MenuEvent`.  
- EVT_MENU_HIGHLIGHT_ALL: A menu item has been highlighted, i.e. the currently selected menu item has changed. See :ref:`wx.MenuEvent`.  






.. note:: 

   An application should normally define an :ref:`wx.CloseEvent`  handler for the frame to respond to system close events, for example so that related data and subwindows can be cleaned up.  







.. seealso:: :ref:`wx.MDIParentFrame`, :ref:`wx.MDIChildFrame`, :ref:`wx.MiniFrame`, :ref:`wx.Dialog`    







|

|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>Frame</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.Frame_inheritance.png" alt="Inheritance diagram of Frame" 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.Frame.html" title="wx.Frame" alt="" coords="63,392,144,421"/> <area shape="rect" id="node2" href="wx.TopLevelWindow.html" title="wx.TopLevelWindow" alt="" coords="33,315,175,344"/> <area shape="rect" id="node3" href="wx.Object.html" title="wx.Object" alt="" coords="5,5,87,35"/> <area shape="rect" id="node6" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="48,83,159,112"/> <area shape="rect" id="node4" href="wx.NonOwnedWindow.html" title="wx.NonOwnedWindow" alt="" coords="25,237,183,267"/> <area shape="rect" id="node5" href="wx.Window.html" title="wx.Window" alt="" coords="59,160,148,189"/> <area shape="rect" id="node7" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="112,5,213,35"/> </map> 
   </p>

|


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

|

.. figure:: _static/images/widgets/fullsize/wxmsw/wx.frame.png
   :alt: wxMSW
   :figclass: floatleft

   **wxMSW**


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

   **wxMAC**


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

   **wxGTK**


|


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

:ref:`wx.aui.AuiMDIParentFrame`, :ref:`DocChildFrame`, :ref:`DocParentFrame`, :ref:`wx.html.HtmlHelpFrame`, :ref:`wx.MDIChildFrame`, :ref:`wx.MDIParentFrame`, :ref:`wx.MiniFrame`, :ref:`wx.PreviewFrame`, :ref:`wx.adv.SplashScreen`

|


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

================================================================================ ================================================================================
:meth:`~wx.Frame.__init__`                                                       Default constructor.
:meth:`~wx.Frame.Centre`                                                         Centres the frame on the display.
:meth:`~wx.Frame.Create`                                                         Used in two-step frame construction.
:meth:`~wx.Frame.CreateStatusBar`                                                Creates a status bar at the bottom of the frame.
:meth:`~wx.Frame.CreateToolBar`                                                  Creates a toolbar at the top or left of the frame.
:meth:`~wx.Frame.GetClientAreaOrigin`                                            Returns the origin of the frame client area (in client coordinates).
:meth:`~wx.Frame.GetMenuBar`                                                     Returns a pointer to the menubar currently associated with the frame (if any).
:meth:`~wx.Frame.GetStatusBar`                                                   Returns a pointer to the status bar currently associated with the frame (if any).
:meth:`~wx.Frame.GetStatusBarPane`                                               Returns the status bar pane used to display menu and toolbar help.
:meth:`~wx.Frame.GetToolBar`                                                     Returns a pointer to the toolbar currently associated with the frame (if any).
:meth:`~wx.Frame.OnCreateStatusBar`                                              Virtual function called when a status bar is requested by :meth:`~Frame.CreateStatusBar` .
:meth:`~wx.Frame.OnCreateToolBar`                                                Virtual function called when a toolbar is requested by :meth:`~Frame.CreateToolBar` .
:meth:`~wx.Frame.PopStatusText`                                                  
:meth:`~wx.Frame.ProcessCommand`                                                 Simulate a menu command.
:meth:`~wx.Frame.PushStatusText`                                                 
:meth:`~wx.Frame.SetMenuBar`                                                     Tells the frame to show the given menu bar.
:meth:`~wx.Frame.SetStatusBar`                                                   Associates a status bar with the frame.
:meth:`~wx.Frame.SetStatusBarPane`                                               Set the status bar pane used to display menu and toolbar help.
:meth:`~wx.Frame.SetStatusText`                                                  Sets the status bar text and redraws the status bar.
:meth:`~wx.Frame.SetStatusWidths`                                                Sets the widths of the fields in the status bar.
:meth:`~wx.Frame.SetToolBar`                                                     Associates a toolbar with the frame.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.Frame.MenuBar`                                                        See :meth:`~wx.Frame.GetMenuBar` and :meth:`~wx.Frame.SetMenuBar`
:attr:`~wx.Frame.StatusBar`                                                      See :meth:`~wx.Frame.GetStatusBar` and :meth:`~wx.Frame.SetStatusBar`
:attr:`~wx.Frame.StatusBarPane`                                                  See :meth:`~wx.Frame.GetStatusBarPane` and :meth:`~wx.Frame.SetStatusBarPane`
:attr:`~wx.Frame.ToolBar`                                                        See :meth:`~wx.Frame.GetToolBar` and :meth:`~wx.Frame.SetToolBar`
================================================================================ ================================================================================


|


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


.. class:: wx.Frame(TopLevelWindow)

   **Possible constructors**::

       Frame()
       
       Frame(parent, id=ID_ANY, title=EmptyString, pos=DefaultPosition,
             size=DefaultSize, style=DEFAULT_FRAME_STYLE, name=FrameNameStr)
       
   
   A frame is a window whose size and position can (usually) be changed
   by the user.



   .. method:: __init__(self, *args, **kw)



      |overload| Overloaded Implementations:

      **~~~**

      
      **__init__** `(self)`
      
      Default constructor.                   
      
      
      
      
      **~~~**

      
      **__init__** `(self, parent, id=ID_ANY, title=EmptyString, pos=DefaultPosition, size=DefaultSize, style=DEFAULT_FRAME_STYLE, name=FrameNameStr)`
      
      Constructor, creating the window.                  
      
      
      
      
      :param `parent`: The window parent. This may be, and often is, ``None``. If it is non-NULL, the frame will be minimized when its parent is minimized and restored when it is restored (although it will still be possible to minimize and restore just this frame itself).   
      :type `parent`: wx.Window
      :param `id`: The window identifier. It may take a value of -1 to indicate a default value.   
      :type `id`: wx.WindowID
      :param `title`: The caption to be displayed on the frame's title bar.   
      :type `title`: string
      :param `pos`: The window position. The value DefaultPosition indicates a default position, chosen by either the windowing system or wxWidgets, depending on platform.   
      :type `pos`: wx.Point
      :param `size`: The window size. The value DefaultSize indicates a default size, chosen by either the windowing system or wxWidgets, depending on platform.   
      :type `size`: wx.Size
      :param `style`: The window style. See :ref:`wx.Frame`  class description.   
      :type `style`: long
      :param `name`: The name of the window. This parameter is used to associate a name with the item, allowing the application user to set Motif resource values for individual windows.  
      :type `name`: string
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
                        
      
      
      
      .. note:: 
      
         For Motif, ``MWM`` (the Motif Window Manager) should be running for any window styles to work (otherwise all styles take effect).  
      
      
      
      
      
      
      
      .. seealso:: :meth:`Create`     
      
      
      
      
      
      
      
      **~~~**






   .. method:: Centre(self, direction=BOTH)

      Centres the frame on the display.                  




      :param `direction`: The parameter may be ``wx.HORIZONTAL``, ``wx.VERTICAL`` or ``wx.BOTH``.   
      :type `direction`: int




                  





   .. method:: Create(self, parent, id=ID_ANY, title=EmptyString, pos=DefaultPosition, size=DefaultSize, style=DEFAULT_FRAME_STYLE, name=FrameNameStr)

      Used in two-step frame construction.                  

      See :ref:`wx.Frame`  for further details.                  


      :param `parent`: 
      :type `parent`: wx.Window
      :param `id`: 
      :type `id`: wx.WindowID
      :param `title`: 
      :type `title`: string
      :param `pos`: 
      :type `pos`: wx.Point
      :param `size`: 
      :type `size`: wx.Size
      :param `style`: 
      :type `style`: long
      :param `name`: 
      :type `name`: string




      :rtype: `bool`








   .. method:: CreateStatusBar(self, number=1, style=STB_DEFAULT_STYLE, id=0, name=StatusBarNameStr)

      Creates a status bar at the bottom of the frame.                  




      :param `number`: The number of fields to create. Specify a value greater than 1 to create a multi-field status bar.   
      :type `number`: int
      :param `style`: The status bar style. See :ref:`wx.StatusBar`  for a list of valid styles.   
      :type `style`: long
      :param `id`: The status bar window identifier. If -1, an identifier will be chosen by wxWidgets.   
      :type `id`: wx.WindowID
      :param `name`: The status bar window name.  
      :type `name`: string












      :rtype: :ref:`wx.StatusBar`



                  



      :returns: 

         A pointer to the status bar if it was created successfully, ``None`` otherwise.  







      .. note:: 

         The width of the status bar is the whole width of the frame (adjusted automatically when resizing), and the height and text size are chosen by the host windowing system.  







      .. seealso:: :meth:`SetStatusText` , :meth:`OnCreateStatusBar` , :meth:`GetStatusBar`     








   .. method:: CreateToolBar(self, style=TB_DEFAULT_STYLE, id=ID_ANY, name=ToolBarNameStr)

      Creates a toolbar at the top or left of the frame.                  




      :param `style`: The toolbar style. See :ref:`wx.ToolBar`  for a list of valid styles.   
      :type `style`: long
      :param `id`: The toolbar window identifier. If -1, an identifier will be chosen by wxWidgets.   
      :type `id`: wx.WindowID
      :param `name`: The toolbar window name.  
      :type `name`: string










      :rtype: :ref:`wx.ToolBar`



                  



      :returns: 

         A pointer to the toolbar if it was created successfully, ``None`` otherwise.  







      .. note:: 

         By default, the toolbar is an instance of :ref:`wx.ToolBar`. To use a different class, override :meth:`OnCreateToolBar` . When a toolbar has been created with this function, or made known to the frame with :meth:`wx.Frame.SetToolBar` , the frame will manage the toolbar position and adjust the return value from :meth:`wx.Window.GetClientSize`   to reflect the available space for application windows. Under Pocket ``PC``, you should always use this function for creating the toolbar to be managed by the frame, so that wxWidgets can use a combined menubar and toolbar. Where you manage your own toolbars, create a :ref:`wx.ToolBar`  as usual.  







      .. seealso:: :meth:`CreateStatusBar` , :meth:`OnCreateToolBar` , :meth:`SetToolBar` , :meth:`GetToolBar`     








   .. method:: GetClientAreaOrigin(self)

      Returns the origin of the frame client area (in client coordinates).                  

      It may be different from (0, 0) if the frame has a toolbar.                  

      :rtype: :ref:`wx.Point`








   .. method:: GetMenuBar(self)

      Returns a pointer to the menubar currently associated with the frame (if any).                  

                

      :rtype: :ref:`wx.MenuBar`







      .. seealso:: :meth:`SetMenuBar` , :ref:`wx.MenuBar`, :ref:`wx.Menu`    








   .. method:: GetStatusBar(self)

      Returns a pointer to the status bar currently associated with the frame (if any).                  

                

      :rtype: :ref:`wx.StatusBar`







      .. seealso:: :meth:`CreateStatusBar` , :ref:`wx.StatusBar`    








   .. method:: GetStatusBarPane(self)

      Returns the status bar pane used to display menu and toolbar help.                  

                

      :rtype: `int`







      .. seealso:: :meth:`SetStatusBarPane`     








   .. method:: GetToolBar(self)

      Returns a pointer to the toolbar currently associated with the frame (if any).                  

                

      :rtype: :ref:`wx.ToolBar`







      .. seealso:: :meth:`CreateToolBar` , :ref:`wx.ToolBar`, :meth:`SetToolBar`     








   .. method:: OnCreateStatusBar(self, number, style, id, name)

      Virtual function called when a status bar is requested by :meth:`CreateStatusBar` .                  




      :param `number`: The number of fields to create.   
      :type `number`: int
      :param `style`: The window style. See :ref:`wx.StatusBar`  for a list of valid styles.   
      :type `style`: long
      :param `id`: The window identifier. If -1, an identifier will be chosen by wxWidgets.   
      :type `id`: wx.WindowID
      :param `name`: The window name.  
      :type `name`: string












      :rtype: :ref:`wx.StatusBar`



                  



      :returns: 

         A status bar object.  







      .. note:: 

         An application can override this function to return a different kind of status bar. The default implementation returns an instance of :ref:`wx.StatusBar`.  







      .. seealso:: :meth:`CreateStatusBar` , :ref:`wx.StatusBar`.   








   .. method:: OnCreateToolBar(self, style, id, name)

      Virtual function called when a toolbar is requested by :meth:`CreateToolBar` .                  




      :param `style`: The toolbar style. See :ref:`wx.ToolBar`  for a list of valid styles.   
      :type `style`: long
      :param `id`: The toolbar window identifier. If -1, an identifier will be chosen by wxWidgets.   
      :type `id`: wx.WindowID
      :param `name`: The toolbar window name.  
      :type `name`: string










      :rtype: :ref:`wx.ToolBar`



                  



      :returns: 

         A toolbar object.  







      .. note:: 

         An application can override this function to return a different kind of toolbar. The default implementation returns an instance of :ref:`wx.ToolBar`.  







      .. seealso:: :meth:`CreateToolBar` , :ref:`wx.ToolBar`.   








   .. method:: PopStatusText(self, number=0)




      :param `number`: 
      :type `number`: int







   .. method:: ProcessCommand(self, id)

      Simulate a menu command.                  




      :param `id`: The identifier for a menu item.   
      :type `id`: int






      :rtype: `bool`



                  





   .. method:: PushStatusText(self, text, number=0)




      :param `text`: 
      :type `text`: string
      :param `number`: 
      :type `number`: int







   .. method:: SetMenuBar(self, menuBar)

      Tells the frame to show the given menu bar.                  




      :param `menuBar`: The menu bar to associate with the frame.  
      :type `menuBar`: wx.MenuBar




                  



      .. note:: 

         If the frame is destroyed, the menu bar and its menus will be destroyed also, so do not delete the menu bar explicitly (except by resetting the frame's menu bar to another frame or ``None``). Under Windows, a size event is generated, so be sure to initialize data members properly before calling :meth:`SetMenuBar` . Note that on some platforms, it is not possible to call this function twice for the same frame object.  







      .. seealso:: :meth:`GetMenuBar` , :ref:`wx.MenuBar`, :ref:`wx.Menu`.   








   .. method:: SetStatusBar(self, statusBar)

      Associates a status bar with the frame.                  

      If `statusBar`  is ``None``, then the status bar, if present, is detached from the frame, but `not`  deleted. 

                


      :param `statusBar`: 
      :type `statusBar`: wx.StatusBar






      .. seealso:: :meth:`CreateStatusBar` , :ref:`wx.StatusBar`, :meth:`GetStatusBar`     








   .. method:: SetStatusBarPane(self, n)

      Set the status bar pane used to display menu and toolbar help.                  

      Using -1 disables help display.                  


      :param `n`: 
      :type `n`: int







   .. method:: SetStatusText(self, text, number=0)

      Sets the status bar text and redraws the status bar.                  




      :param `text`: The text for the status field.   
      :type `text`: string
      :param `number`: The status field (starting from zero).  
      :type `number`: int






                  



      .. note:: 

         Use an empty string to clear the status bar.  







      .. seealso:: :meth:`CreateStatusBar` , :ref:`wx.StatusBar`    








   .. method:: SetStatusWidths(self, widths)

      Sets the widths of the fields in the status bar.                  




      :param `widths`: Must contain an array of n integers, each of which is a status field width in pixels. A value of -1 indicates that the field is variable width; at least one field must be -1. You should delete this array after calling :meth:`SetStatusWidths` .  
      :type `widths`: list of integers






      




   .. method:: SetToolBar(self, toolBar)

      Associates a toolbar with the frame.                  


      :param `toolBar`: 
      :type `toolBar`: wx.ToolBar







   .. attribute:: MenuBar

      See :meth:`~wx.Frame.GetMenuBar` and :meth:`~wx.Frame.SetMenuBar`


   .. attribute:: StatusBar

      See :meth:`~wx.Frame.GetStatusBar` and :meth:`~wx.Frame.SetStatusBar`


   .. attribute:: StatusBarPane

      See :meth:`~wx.Frame.GetStatusBarPane` and :meth:`~wx.Frame.SetStatusBarPane`


   .. attribute:: ToolBar

      See :meth:`~wx.Frame.GetToolBar` and :meth:`~wx.Frame.SetToolBar`