1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxStaticText}}\label{wxstatictext}
|
|
|
|
|
|
|
|
A static text control displays one or more lines of read-only text.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxControl}{wxcontrol}\\
|
|
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/stattext.h>
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{Window styles}
|
|
|
|
|
1999-11-01 20:25:43 -05:00
|
|
|
\twocolwidtha{5cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
|
|
|
\twocolitem{\windowstyle{wxALIGN\_LEFT}}{Align the text to the left}
|
|
|
|
\twocolitem{\windowstyle{wxALIGN\_RIGHT}}{Align the text to the right}
|
2002-06-07 16:15:28 -04:00
|
|
|
\twocolitem{\windowstyle{wxALIGN\_CENTRE}}{Center the text (horizontally)}
|
1999-11-01 20:25:43 -05:00
|
|
|
\twocolitem{\windowstyle{wxST\_NO\_AUTORESIZE}}{By default, the control will
|
|
|
|
adjust its size to exactly fit to the size of the text when
|
|
|
|
\helpref{SetLabel}{wxstatictextsetlabel} is called. If this style flag is
|
|
|
|
given, the control will not change its size (this style is especially useful
|
|
|
|
with controls which also have wxALIGN\_RIGHT or CENTER style because otherwise
|
|
|
|
they won't make sense any longer after a call to SetLabel)}
|
|
|
|
\end{twocollist}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
See also \helpref{window styles overview}{windowstyles}.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxStaticBitmap}{wxstaticbitmap}, \helpref{wxStaticBox}{wxstaticbox}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxStaticText::wxStaticText}\label{wxstatictextconstr}
|
|
|
|
|
|
|
|
\func{}{wxStaticText}{\void}
|
|
|
|
|
|
|
|
Default constructor.
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{}{wxStaticText}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
|
2000-07-15 15:51:35 -04:00
|
|
|
\param{const wxString\& }{label}, \param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
1998-06-14 08:11:50 -04:00
|
|
|
\param{long}{ style = 0}, \param{const wxString\& }{name = ``staticText"}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Constructor, creating and showing a text control.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{parent}{Parent window. Should not be NULL.}
|
|
|
|
|
|
|
|
\docparam{id}{Control identifier. A value of -1 denotes a default value.}
|
|
|
|
|
|
|
|
\docparam{label}{Text label.}
|
|
|
|
|
|
|
|
\docparam{pos}{Window position.}
|
|
|
|
|
|
|
|
\docparam{size}{Window size.}
|
|
|
|
|
|
|
|
\docparam{style}{Window style. See \helpref{wxStaticText}{wxstatictext}.}
|
|
|
|
|
|
|
|
\docparam{name}{Window name.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxStaticText::Create}{wxstatictextcreate}
|
|
|
|
|
|
|
|
\membersection{wxStaticText::Create}\label{wxstatictextcreate}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
|
2000-07-15 15:51:35 -04:00
|
|
|
\param{const wxString\& }{label}, \param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
1998-06-14 08:11:50 -04:00
|
|
|
\param{long}{ style = 0}, \param{const wxString\& }{name = ``staticText"}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Creation function, for two-step construction. For details see \helpref{wxStaticText::wxStaticText}{wxstatictextconstr}.
|
|
|
|
|
|
|
|
\membersection{wxStaticText::GetLabel}\label{wxstatictextgetlabel}
|
|
|
|
|
|
|
|
\constfunc{wxString}{GetLabel}{\void}
|
|
|
|
|
|
|
|
Returns the contents of the control.
|
|
|
|
|
|
|
|
\membersection{wxStaticText::SetLabel}\label{wxstatictextsetlabel}
|
|
|
|
|
|
|
|
\func{virtual void}{SetLabel}{\param{const wxString\& }{ label}}
|
|
|
|
|
1999-11-01 20:25:43 -05:00
|
|
|
Sets the static text label and updates the controls size to exactly fit the
|
|
|
|
label unless the control has wxST\_NO\_AUTORESIZE flag.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{label}{The new label to set. It may contain newline characters.}
|
|
|
|
|