]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/frame.tex
define _HPUX_SOURCE under HP-UX, otherwise many things are not defined in standard...
[wxWidgets.git] / docs / latex / wx / frame.tex
CommitLineData
a660d684
KB
1\section{\class{wxFrame}}\label{wxframe}
2
1c4f8f8d
VZ
3A frame is a window whose size and position can (usually) be changed by the
4user. It usually has thick borders and a title bar, and can optionally contain
5a menu bar, toolbar and status bar. A frame can contain any window that is not
6a frame or dialog.
a660d684 7
1c4f8f8d
VZ
8A frame that has a status bar and toolbar created via the
9CreateStatusBar/CreateToolBar functions manages these windows, and adjusts the
10value returned by GetClientSize to reflect the remaining size available to
11application windows.
81d66cf3 12
a660d684
KB
13\wxheading{Derived from}
14
834ed994 15\helpref{wxTopLevelWindow}{wxtoplevelwindow}\\
a660d684
KB
16\helpref{wxWindow}{wxwindow}\\
17\helpref{wxEvtHandler}{wxevthandler}\\
18\helpref{wxObject}{wxobject}
19
954b8ae6
JS
20\wxheading{Include files}
21
22<wx/frame.h>
23
a660d684
KB
24\wxheading{Window styles}
25
26\twocolwidtha{5cm}
27\begin{twocollist}\itemsep=0pt
01a01d10 28\twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxRESIZE\_BORDER \pipe wxSYSTEM\_MENU \pipe wxCAPTION \pipe wxCLOSE\_BOX \pipe wxCLIP\_CHILDREN}.}
6453876e 29\twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized). Windows only. }
a660d684 30\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.}
f6bcfd97
BP
31\twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}. Windows only.}
32\twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame.}
33\twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized. Windows only.}
34\twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame.}
850c6ed4 35\twocolitem{\windowstyle{wxCLOSE\_BOX}}{Displays a close box on the frame.}
9dfef5ac 36\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of all other windows,
3faa8195 37see also wxFRAME\_FLOAT\_ON\_PARENT.}
f6bcfd97 38\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu.}
b3daa5a3
VZ
39\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window.}
40\twocolitem{\windowstyle{wxFRAME\_TOOL\_WINDOW}}{Causes a frame with a small
36d23121 41titlebar to be created; the frame does not appear in the taskbar under Windows or GTK+.}
9dfef5ac 42\twocolitem{\windowstyle{wxFRAME\_NO\_TASKBAR}}{Creates an otherwise normal
baf277a2
VS
43frame but it does not appear in the taskbar under Windows or GTK+ (note that it
44will minimize to the desktop window under Windows which may seem strange to the
45users and thus it might be better to use this style only without
46wxMINIMIZE\_BOX style). In wxGTK, the flag is respected only if GTK+ is at
47least version 2.2 and the window manager supports
48\urlref{\_NET\_WM\_STATE\_SKIP\_TASKBAR}{http://freedesktop.org/Standards/wm-spec/1.3/ar01s05.html} hint.
9dfef5ac
VZ
49Has no effect under other platforms.}
50\twocolitem{\windowstyle{wxFRAME\_FLOAT\_ON\_PARENT}}{The frame will always be
51on top of its parent (unlike wxSTAY\_ON\_TOP). A frame created with this style
52must have a non-NULL parent.}
26a80c22 53\twocolitem{\windowstyle{wxFRAME\_EX\_CONTEXTHELP}}{Under Windows, puts a query button on the
fc2171bd 54caption. When pressed, Windows will go into a context-sensitive help mode and wxWidgets will send
26a80c22
JS
55a wxEVT\_HELP event if the user clicked on an application window. {\it Note} that this is an extended
56style and must be set by calling \helpref{SetExtraStyle}{wxwindowsetextrastyle} before Create is called (two-step construction).
335c9e32 57You cannot use this style together with wxMAXIMIZE\_BOX or wxMINIMIZE\_BOX, so
d2c2afc9 58you should use\rtfsp
c8abcf33 59{\tt wxDEFAULT\_FRAME\_STYLE \& ~ (wxMINIMIZE\_BOX | wxMAXIMIZE\_BOX)} for the
0032ddbb 60frames having this style (the dialogs don't have a minimize or a maximize box by
335c9e32 61default)}
6a7e6411 62\twocolitem{\windowstyle{wxFRAME\_SHAPED}}{Windows with this style are
8caac90d 63 allowed to have their shape changed with the \helpref{SetShape}{wxtoplevelwindowsetshape} method.}
03d77609 64\twocolitem{\windowstyle{wxFRAME\_EX\_METAL}}{On Mac OS X, frames with this style will be shown with a metallic look. This is an {\it extra} style.}
a660d684
KB
65\end{twocollist}
66
f6bcfd97
BP
67The default frame style is for normal, resizeable frames. To create a frame
68which can not be resized by user, you may use the following combination of
c8abcf33 69styles: {\tt wxDEFAULT\_FRAME\_STYLE \& ~ (wxRESIZE\_BORDER \pipe wxRESIZE\_BOX \pipe wxMAXIMIZE\_BOX)}.
f6bcfd97
BP
70% Note: the space after the tilde is necessary or Tex2RTF complains.
71
6453876e 72See also \helpref{window styles overview}{windowstyles}.
a660d684 73
9b67a3fd
VZ
74\wxheading{Default event processing}
75
76wxFrame processes the following events:
77
78\begin{twocollist}\itemsep=0pt
974d9c98
VZ
79\twocolitem{\helpref{wxEVT\_SIZE}{wxsizeevent}}{If the frame has exactly one
80child window, not counting the status and toolbar, this child is resized to
81take the entire frame client area. If two or more windows are present, they
1542ea39 82should be laid out explicitly either by manually handling wxEVT\_SIZE or using
9b67a3fd
VZ
83\helpref{sizers}{sizeroverview}}
84
974d9c98
VZ
85\twocolitem{\helpref{wxEVT\_MENU\_HIGHLIGHT}{wxmenuevent}}{The default
86implementation displays the \helpref{help string}{wxmenuitemgethelp} associated
87with the selected item in the first pane of the status bar, if there is one.}
9b67a3fd
VZ
88\end{twocollist}
89
a660d684
KB
90\wxheading{Remarks}
91
f4fcc291 92An application should normally define an \helpref{wxCloseEvent}{wxcloseevent} handler for the
a660d684
KB
93frame to respond to system close events, for example so that related data and subwindows can be cleaned up.
94
95\wxheading{See also}
96
97\helpref{wxMDIParentFrame}{wxmdiparentframe}, \helpref{wxMDIChildFrame}{wxmdichildframe},\rtfsp
98\helpref{wxMiniFrame}{wxminiframe}, \helpref{wxDialog}{wxdialog}
99
100\latexignore{\rtfignore{\wxheading{Members}}}
101
f0e8a2d0 102\membersection{wxFrame::wxFrame}\label{wxframector}
a660d684
KB
103
104\func{}{wxFrame}{\void}
105
106Default constructor.
107
eaaa6a06 108\func{}{wxFrame}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
a660d684
KB
109\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
110\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp
111\param{const wxString\& }{name = ``frame"}}
112
113Constructor, creating the window.
114
115\wxheading{Parameters}
116
117\docparam{parent}{The window parent. This may be NULL. If it is non-NULL, the frame will
118always be displayed on top of the parent window on Windows.}
119
120\docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.}
121
122\docparam{title}{The caption to be displayed on the frame's title bar.}
123
124\docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by
fc2171bd 125either the windowing system or wxWidgets, depending on platform.}
a660d684
KB
126
127\docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by
fc2171bd 128either the windowing system or wxWidgets, depending on platform.}
a660d684
KB
129
130\docparam{style}{The window style. See \helpref{wxFrame}{wxframe}.}
131
132\docparam{name}{The name of the window. This parameter is used to associate a name with the item,
133allowing the application user to set Motif resource values for
134individual windows.}
135
136\wxheading{Remarks}
137
138For Motif, MWM (the Motif Window Manager) should be running for any window styles to work
139(otherwise all styles take effect).
140
141\wxheading{See also}
142
143\helpref{wxFrame::Create}{wxframecreate}
144
f0e8a2d0 145\membersection{wxFrame::\destruct{wxFrame}}\label{wxframedtor}
a660d684
KB
146
147\func{void}{\destruct{wxFrame}}{\void}
148
149Destructor. Destroys all child windows and menu bar if present.
150
151\membersection{wxFrame::Centre}\label{wxframecentre}
152
eaaa6a06 153\func{void}{Centre}{\param{int}{ direction = wxBOTH}}
a660d684
KB
154
155Centres the frame on the display.
156
157\wxheading{Parameters}
158
159\docparam{direction}{The parameter may be {\tt wxHORIZONTAL}, {\tt wxVERTICAL} or {\tt wxBOTH}.}
160
a660d684
KB
161\membersection{wxFrame::Create}\label{wxframecreate}
162
eaaa6a06 163\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
a660d684
KB
164\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
165\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp
166\param{const wxString\& }{name = ``frame"}}
167
f0e8a2d0 168Used in two-step frame construction. See \helpref{wxFrame::wxFrame}{wxframector}\rtfsp
a660d684
KB
169for further details.
170
171\membersection{wxFrame::CreateStatusBar}\label{wxframecreatestatusbar}
172
81d66cf3
JS
173\func{virtual wxStatusBar*}{CreateStatusBar}{\param{int}{ number = 1},
174 \param{long}{ style = 0},
175 \param{wxWindowID}{ id = -1}, \param{const wxString\&}{ name = "statusBar"}}
a660d684
KB
176
177Creates a status bar at the bottom of the frame.
178
179\wxheading{Parameters}
180
181\docparam{number}{The number of fields to create. Specify a
182value greater than 1 to create a multi-field status bar.}
183
81d66cf3
JS
184\docparam{style}{The status bar style. See \helpref{wxStatusBar}{wxstatusbar} for a list
185of valid styles.}
186
187\docparam{id}{The status bar window identifier. If -1, an identifier will be chosen by
fc2171bd 188wxWidgets.}
81d66cf3
JS
189
190\docparam{name}{The status bar window name.}
191
a660d684
KB
192\wxheading{Return value}
193
43e8916f 194A pointer to the status bar if it was created successfully, NULL otherwise.
a660d684
KB
195
196\wxheading{Remarks}
197
198The width of the status bar is the whole width of the frame (adjusted automatically when
199resizing), and the height and text size are chosen by the host windowing system.
200
201By default, the status bar is an instance of wxStatusBar. To use a different class,
202override \helpref{wxFrame::OnCreateStatusBar}{wxframeoncreatestatusbar}.
203
204Note that you can put controls and other windows on the status bar if you wish.
205
206\wxheading{See also}
207
208\helpref{wxFrame::SetStatusText}{wxframesetstatustext},\rtfsp
209\helpref{wxFrame::OnCreateStatusBar}{wxframeoncreatestatusbar},\rtfsp
210\helpref{wxFrame::GetStatusBar}{wxframegetstatusbar}
211
81d66cf3
JS
212\membersection{wxFrame::CreateToolBar}\label{wxframecreatetoolbar}
213
214\func{virtual wxToolBar*}{CreateToolBar}{\param{long}{ style = wxNO\_BORDER \pipe wxTB\_HORIZONTAL},
215 \param{wxWindowID}{ id = -1}, \param{const wxString\&}{ name = "toolBar"}}
216
217Creates a toolbar at the top or left of the frame.
218
219\wxheading{Parameters}
220
221\docparam{style}{The toolbar style. See \helpref{wxToolBar}{wxtoolbar} for a list
222of valid styles.}
223
224\docparam{id}{The toolbar window identifier. If -1, an identifier will be chosen by
fc2171bd 225wxWidgets.}
81d66cf3
JS
226
227\docparam{name}{The toolbar window name.}
228
229\wxheading{Return value}
230
43e8916f 231A pointer to the toolbar if it was created successfully, NULL otherwise.
81d66cf3
JS
232
233\wxheading{Remarks}
234
235By default, the toolbar is an instance of wxToolBar (which is defined to be
236a suitable toolbar class on each platform, such as wxToolBar95). To use a different class,
237override \helpref{wxFrame::OnCreateToolBar}{wxframeoncreatetoolbar}.
238
239When a toolbar has been created with this function, or made known to the frame
240with \helpref{wxFrame::SetToolBar}{wxframesettoolbar}, the frame will manage the toolbar
241position and adjust the return value from \helpref{wxWindow::GetClientSize}{wxwindowgetclientsize} to
242reflect the available space for application windows.
243
a9102b36
JS
244Under Pocket PC, you should {\it always} use this function for creating the toolbar
245to be managed by the frame, so that wxWidgets can use a combined
246menubar and toolbar. Where you manage your own toolbars, create a wxToolBar
247as usual.
248
81d66cf3
JS
249\wxheading{See also}
250
251\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar},\rtfsp
252\helpref{wxFrame::OnCreateToolBar}{wxframeoncreatetoolbar},\rtfsp
253\helpref{wxFrame::SetToolBar}{wxframesettoolbar},\rtfsp
254\helpref{wxFrame::GetToolBar}{wxframegettoolbar}
255
1c4f8f8d
VZ
256\membersection{wxFrame::GetClientAreaOrigin}\label{wxframegetclientareaorigin}
257
258\constfunc{wxPoint}{GetClientAreaOrigin}{\void}
259
260Returns the origin of the frame client area (in client coordinates). It may be
261different from (0, 0) if the frame has a toolbar.
262
a660d684
KB
263\membersection{wxFrame::GetMenuBar}\label{wxframegetmenubar}
264
265\constfunc{wxMenuBar*}{GetMenuBar}{\void}
266
267Returns a pointer to the menubar currently associated with the frame (if any).
268
269\wxheading{See also}
270
271\helpref{wxFrame::SetMenuBar}{wxframesetmenubar}, \helpref{wxMenuBar}{wxmenubar}, \helpref{wxMenu}{wxmenu}
272
273\membersection{wxFrame::GetStatusBar}\label{wxframegetstatusbar}
274
fa482912 275\constfunc{wxStatusBar*}{GetStatusBar}{\void}
a660d684
KB
276
277Returns a pointer to the status bar currently associated with the frame (if any).
278
279\wxheading{See also}
280
281\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar}
282
0b0625e9
JS
283\membersection{wxFrame::GetStatusBarPane}\label{wxframegetstatusbarpane}
284
285\func{int}{GetStatusBarPane}{\void}
286
287Returns the status bar pane used to display menu and toolbar help.
288
289\wxheading{See also}
290
291\helpref{wxFrame::SetStatusBarPane}{wxframesetstatusbarpane}
292
81d66cf3
JS
293\membersection{wxFrame::GetToolBar}\label{wxframegettoolbar}
294
fa482912 295\constfunc{wxToolBar*}{GetToolBar}{\void}
81d66cf3
JS
296
297Returns a pointer to the toolbar currently associated with the frame (if any).
298
299\wxheading{See also}
300
301\helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}, \helpref{wxToolBar}{wxtoolbar},\rtfsp
302\helpref{wxFrame::SetToolBar}{wxframesettoolbar}
303
a660d684
KB
304\membersection{wxFrame::OnCreateStatusBar}\label{wxframeoncreatestatusbar}
305
dbdb39b2 306\func{virtual wxStatusBar*}{OnCreateStatusBar}{\param{int }{number},
81d66cf3
JS
307 \param{long}{ style},
308 \param{wxWindowID}{ id}, \param{const wxString\&}{ name}}
a660d684
KB
309
310Virtual function called when a status bar is requested by \helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}.
311
312\wxheading{Parameters}
313
314\docparam{number}{The number of fields to create.}
315
81d66cf3
JS
316\docparam{style}{The window style. See \helpref{wxStatusBar}{wxstatusbar} for a list
317of valid styles.}
318
319\docparam{id}{The window identifier. If -1, an identifier will be chosen by
fc2171bd 320wxWidgets.}
81d66cf3
JS
321
322\docparam{name}{The window name.}
323
a660d684
KB
324\wxheading{Return value}
325
326A status bar object.
327
328\wxheading{Remarks}
329
330An application can override this function to return a different kind of status bar. The default
331implementation returns an instance of \helpref{wxStatusBar}{wxstatusbar}.
332
333\wxheading{See also}
334
335\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar}.
336
81d66cf3
JS
337\membersection{wxFrame::OnCreateToolBar}\label{wxframeoncreatetoolbar}
338
339\func{virtual wxToolBar*}{OnCreateToolBar}{\param{long}{ style},
340 \param{wxWindowID}{ id}, \param{const wxString\&}{ name}}
341
342Virtual function called when a toolbar is requested by \helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}.
343
344\wxheading{Parameters}
345
346\docparam{style}{The toolbar style. See \helpref{wxToolBar}{wxtoolbar} for a list
347of valid styles.}
348
349\docparam{id}{The toolbar window identifier. If -1, an identifier will be chosen by
fc2171bd 350wxWidgets.}
81d66cf3
JS
351
352\docparam{name}{The toolbar window name.}
353
354\wxheading{Return value}
355
356A toolbar object.
357
358\wxheading{Remarks}
359
360An application can override this function to return a different kind of toolbar. The default
361implementation returns an instance of \helpref{wxToolBar}{wxtoolbar}.
362
363\wxheading{See also}
364
365\helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}, \helpref{wxToolBar}{wxtoolbar}.
366
f6e9a818
RN
367
368\membersection{wxFrame::ProcessCommand}\label{wxframeprocesscommand}
369
370\func{void}{ProcessCommand}{\param{int }{id}}
371
372Simulate a menu command.
373
374\wxheading{Parameters}
375
376\docparam{id}{The identifier for a menu item.}
377
378
a4f25aef
VZ
379\membersection{wxFrame::SendSizeEvent}\label{wxframesendsizeevent}
380
381\func{void}{SendSizeEvent}{\void}
382
383This function sends a dummy \helpref{size event}{wxsizeevent} to the frame
384forcing it to reevaluate its children positions. It is sometimes useful to call
385this function after adding or deleting a children after the frame creation or
386if a child size changes.
387
388Note that if the frame is using either sizers or constraints for the children
389layout, it is enough to call \helpref{Layout()}{wxwindowlayout} directly and
390this function should not be used in this case.
391
1542ea39 392% VZ: we don't have all this any more (18.08.00)
d9b815ac
VZ
393%
394%Under Windows, instead of using {\bf SetIcon}, you can add the
395%following lines to your MS Windows resource file:
396%
397%\begin{verbatim}
398%wxSTD_MDIPARENTFRAME ICON icon1.ico
399%wxSTD_MDICHILDFRAME ICON icon2.ico
400%wxSTD_FRAME ICON icon3.ico
401%\end{verbatim}
402%
403%where icon1.ico will be used for the MDI parent frame, icon2.ico
404%will be used for MDI child frames, and icon3.ico will be used for
405%non-MDI frames.
406%
407%If these icons are not supplied, and {\bf SetIcon} is not called either,
408%then the following defaults apply if you have included wx.rc.
409%
410%\begin{verbatim}
411%wxDEFAULT_FRAME ICON std.ico
412%wxDEFAULT_MDIPARENTFRAME ICON mdi.ico
413%wxDEFAULT_MDICHILDFRAME ICON child.ico
414%\end{verbatim}
415%
416%You can replace std.ico, mdi.ico and child.ico with your own defaults
fc2171bd 417%for all your wxWidgets application. Currently they show the same icon.
a660d684 418
a660d684
KB
419\membersection{wxFrame::SetMenuBar}\label{wxframesetmenubar}
420
421\func{void}{SetMenuBar}{\param{wxMenuBar* }{menuBar}}
422
423Tells the frame to show the given menu bar.
424
425\wxheading{Parameters}
426
427\docparam{menuBar}{The menu bar to associate with the frame.}
428
429\wxheading{Remarks}
430
431If the frame is destroyed, the
432menu bar and its menus will be destroyed also, so do not delete the menu
433bar explicitly (except by resetting the frame's menu bar to another
434frame or NULL).
435
684761db 436Under Windows, a size event is generated, so be sure to initialize
a660d684
KB
437data members properly before calling {\bf SetMenuBar}.
438
684761db 439Note that on some platforms, it is not possible to call this function twice for the same frame object.
a660d684
KB
440
441\wxheading{See also}
442
443\helpref{wxFrame::GetMenuBar}{wxframegetmenubar}, \helpref{wxMenuBar}{wxmenubar}, \helpref{wxMenu}{wxmenu}.
444
81d66cf3
JS
445\membersection{wxFrame::SetStatusBar}\label{wxframesetstatusbar}
446
447\func{void}{SetStatusBar}{\param{wxStatusBar*}{ statusBar}}
448
449Associates a status bar with the frame.
450
451\wxheading{See also}
452
453\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar},\rtfsp
454\helpref{wxFrame::GetStatusBar}{wxframegetstatusbar}
455
0b0625e9
JS
456\membersection{wxFrame::SetStatusBarPane}\label{wxframesetstatusbarpane}
457
458\func{void}{SetStatusBarPane}{\param{int}{ n}}
459
460Set the status bar pane used to display menu and toolbar help.
461Using -1 disables help display.
462
a660d684
KB
463\membersection{wxFrame::SetStatusText}\label{wxframesetstatustext}
464
eaaa6a06 465\func{virtual void}{SetStatusText}{\param{const wxString\& }{ text}, \param{int}{ number = 0}}
a660d684
KB
466
467Sets the status bar text and redraws the status bar.
468
469\wxheading{Parameters}
470
471\docparam{text}{The text for the status field.}
472
473\docparam{number}{The status field (starting from zero).}
474
475\wxheading{Remarks}
476
477Use an empty string to clear the status bar.
478
479\wxheading{See also}
480
481\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar}
482
483\membersection{wxFrame::SetStatusWidths}\label{wxframesetstatuswidths}
484
eaaa6a06 485\func{virtual void}{SetStatusWidths}{\param{int}{ n}, \param{int *}{widths}}
a660d684
KB
486
487Sets the widths of the fields in the status bar.
488
489\wxheading{Parameters}
490
491\wxheading{n}{The number of fields in the status bar. It must be the
492same used in \helpref{CreateStatusBar}{wxframecreatestatusbar}.}
493
494\docparam{widths}{Must contain an array of {\it n} integers, each of which is a status field width
495in pixels. A value of -1 indicates that the field is variable width; at least one
496field must be -1. You should delete this array after calling {\bf SetStatusWidths}.}
497
498\wxheading{Remarks}
499
500The widths of the variable fields are calculated from the total width of all fields,
564747ee 501minus the sum of widths of the non-variable fields, divided by the number of
a660d684
KB
502variable fields.
503
564747ee
RD
504\pythonnote{Only a single parameter is required, a Python list of
505integers.}
506
f3539882 507\perlnote{In wxPerl this method takes the field widths as parameters.}
5873607e 508
81d66cf3
JS
509\membersection{wxFrame::SetToolBar}\label{wxframesettoolbar}
510
511\func{void}{SetToolBar}{\param{wxToolBar*}{ toolBar}}
512
513Associates a toolbar with the frame.
514
515\wxheading{See also}
516
517\helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}, \helpref{wxToolBar}{wxtoolbar},\rtfsp
518\helpref{wxFrame::GetToolBar}{wxframegettoolbar}
519