⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 text.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
📖 第 1 页 / 共 3 页
字号:
is to load the first dropped file into the control.\wxheading{Parameters}\docparam{event}{The drop files event.}\wxheading{Remarks}This is not implemented on non-Windows platforms.\wxheading{See also}\helpref{wxDropFilesEvent}{wxdropfilesevent}\membersection{wxTextCtrl::Paste}\label{wxtextctrlpaste}\func{virtual void}{Paste}{\void}Pastes text from the clipboard to the text item.\membersection{wxTextCtrl::PositionToXY}\label{wxtextctrlpositiontoxy}\constfunc{bool}{PositionToXY}{\param{long }{pos}, \param{long *}{x}, \param{long *}{y}}Converts given position to a zero-based column, line number pair.\wxheading{Parameters}\docparam{pos}{Position.}\docparam{x}{Receives zero based column number.}\docparam{y}{Receives zero based line number.}\wxheading{Return value}{\tt true} on success, {\tt false} on failure (most likely due to a too large positionparameter).\wxheading{See also}\helpref{wxTextCtrl::XYToPosition}{wxtextctrlxytoposition}\pythonnote{In Python, PositionToXY() returns a tuple containing the x andy values, so (x,y) = PositionToXY() is equivalent to the call describedabove.}\perlnote{In wxPerl this method only takes the {\tt pos} parameter, andreturns a 2-element list {\tt ( x, y )}.}\membersection{wxTextCtrl::Redo}\label{wxtextctrlredo}\func{virtual void}{Redo}{\void}If there is a redo facility and the last operation can be redone, redoes the last operation. Does nothingif there is no redo facility.\membersection{wxTextCtrl::Remove}\label{wxtextctrlremove}\func{virtual void}{Remove}{\param{long}{ from}, \param{long}{ to}}Removes the text starting at the first given position up to (but not including)the character at the last position.\wxheading{Parameters}\docparam{from}{The first position.}\docparam{to}{The last position.}\membersection{wxTextCtrl::Replace}\label{wxtextctrlreplace}\func{virtual void}{Replace}{\param{long}{ from}, \param{long}{ to}, \param{const wxString\& }{value}}Replaces the text starting at the first position up to (but not including)the character at the last position with the given text.\wxheading{Parameters}\docparam{from}{The first position.}\docparam{to}{The last position.}\docparam{value}{The value to replace the existing text with.}\membersection{wxTextCtrl::SaveFile}\label{wxtextctrlsavefile}\func{bool}{SaveFile}{\param{const wxString\& }{ filename}, \param{int }{fileType = wxTEXT\_TYPE\_ANY}}Saves the contents of the control in a text file.\wxheading{Parameters}\docparam{filename}{The name of the file in which to save the text.}\docparam{fileType}{The type of file to save. This is currently ignored in wxTextCtrl.}\wxheading{Return value}{\tt true} if the operation was successful, {\tt false} otherwise.\membersection{wxTextCtrl::SetDefaultStyle}\label{wxtextctrlsetdefaultstyle}\func{bool}{SetDefaultStyle}{\param{const wxTextAttr\& }{style}}Changes the default style to use for the new text which is going to be addedto the control using \helpref{WriteText}{wxtextctrlwritetext} or\rtfsp\helpref{AppendText}{wxtextctrlappendtext}.If either of the font, foreground, or background colour is not set in\rtfsp{\it style}, the values of the previous default style are used for them. Ifthe previous default style didn't set them neither, the global font or coloursof the text control itself are used as fall back.However if the {\it style} parameter is the default wxTextAttr, then thedefault style is just reset (instead of being combined with the new style whichwouldn't change it at all).\wxheading{Parameters}\docparam{style}{The style for the new text.}\wxheading{Return value}{\tt true} on success, {\tt false} if an error occurred - may also mean thatthe styles are not supported under this platform.\wxheading{See also}\helpref{GetDefaultStyle}{wxtextctrlgetdefaultstyle}\membersection{wxTextCtrl::SetEditable}\label{wxtextctrlseteditable}\func{virtual void}{SetEditable}{\param{const bool}{ editable}}Makes the text item editable or read-only, overriding the {\bf wxTE\_READONLY} flag.\wxheading{Parameters}\docparam{editable}{If {\tt true}, the control is editable. If {\tt false}, the control is read-only.}\wxheading{See also}\helpref{IsEditable}{wxtextctrliseditable}\membersection{wxTextCtrl::SetInsertionPoint}\label{wxtextctrlsetinsertionpoint}\func{virtual void}{SetInsertionPoint}{\param{long}{ pos}}Sets the insertion point at the given position.\wxheading{Parameters}\docparam{pos}{Position to set.}\membersection{wxTextCtrl::SetInsertionPointEnd}\label{wxtextctrlsetinsertionpointend}\func{virtual void}{SetInsertionPointEnd}{\void}Sets the insertion point at the end of the text control. This is equivalentto \helpref{SetInsertionPoint}{wxtextctrlsetinsertionpoint}(\helpref{GetLastPosition}{wxtextctrlgetlastposition}()).\membersection{wxTextCtrl::SetMaxLength}\label{wxtextctrlsetmaxlength}\func{virtual void}{SetMaxLength}{\param{unsigned long }{len}}This function sets the maximum number of characters the user can enter into thecontrol. In other words, it allows to limit the text value length to {\it len}not counting the terminating {\tt NUL} character.If {\it len} is $0$, the previously set max length limit, if any, is discardedand the user may enter as much text as the underlying native text controlwidget supports (typically at least 32Kb).If the user tries to enter more characters into the text control when italready is filled up to the maximal length, a{\tt wxEVT\_COMMAND\_TEXT\_MAXLEN} event is sent to notify the program about it(giving it the possibility to show an explanatory message, for example) and theextra input is discarded.Note that under GTK+, this function may only be used with single line text controls.\wxheading{Compatibility}Only implemented in wxMSW/wxGTK starting with wxWidgets 2.3.2.\membersection{wxTextCtrl::SetModified}\label{wxtextctrlsetmodified}\func{void}{SetModified}{\param{bool }{modified}}Marks the control as being modified by the user or not.\wxheading{See also}\helpref{MarkDirty}{wxtextctrlmarkdirty}, \helpref{DiscardEdits}{wxtextctrldiscardedits}\membersection{wxTextCtrl::SetSelection}\label{wxtextctrlsetselection}\func{virtual void}{SetSelection}{\param{long}{ from}, \param{long}{ to}}Selects the text starting at the first position up to (but not including) thecharacter at the last position. If both parameters are equal to $-1$ all textin the control is selected.\wxheading{Parameters}\docparam{from}{The first position.}\docparam{to}{The last position.}\membersection{wxTextCtrl::SetStyle}\label{wxtextctrlsetstyle}\func{bool}{SetStyle}{\param{long }{start}, \param{long }{end}, \param{const wxTextAttr\& }{style}}Changes the style of the given range. If any attribute within {\it style} isnot set, the corresponding attribute from \helpref{GetDefaultStyle()}{wxtextctrlgetdefaultstyle} is used.\wxheading{Parameters}\docparam{start}{The start of the range to change.}\docparam{end}{The end of the range to change.}\docparam{style}{The new style for the range.}\wxheading{Return value}{\tt true} on success, {\tt false} if an error occurred - it may also mean thatthe styles are not supported under this platform.\wxheading{See also}\helpref{wxTextCtrl::GetStyle}{wxtextctrlgetstyle}, \helpref{wxTextAttr}{wxtextattr}\membersection{wxTextCtrl::SetValue}\label{wxtextctrlsetvalue}\func{virtual void}{SetValue}{\param{const wxString\& }{ value}}Sets the text value and marks the control as not-modified (which means that\helpref{IsModified}{wxtextctrlismodified} would return {\tt false} immediatelyafter the call to SetValue).Note that this function will generate a {\tt wxEVT\_COMMAND\_TEXT\_UPDATED}event.This function is deprecated and should not be used in new code. Please use the\helpref{ChangeValue}{wxtextctrlchangevalue} function instead.\wxheading{Parameters}\docparam{value}{The new value to set. It may contain newline characters if the text control is multi-line.}\membersection{wxTextCtrl::ChangeValue}\label{wxtextctrlchangevalue}\func{virtual void}{ChangeValue}{\param{const wxString\& }{ value}}Sets the text value and marks the control as not-modified (which means that\helpref{IsModified}{wxtextctrlismodified} would return {\tt false} immediatelyafter the call to SetValue).Note that this function will \emph{not} generate the {\tt wxEVT\_COMMAND\_TEXT\_UPDATED} event.This is the only difference with \helpref{SetValue}{wxtextctrlsetvalue}.See \helpref{this topic}{progevent} for more information.\newsince{2.7.1}\wxheading{Parameters}\docparam{value}{The new value to set. It may contain newline characters if the text control is multi-line.}\membersection{wxTextCtrl::ShowPosition}\label{wxtextctrlshowposition}\func{void}{ShowPosition}{\param{long}{ pos}}Makes the line containing the given position visible.\wxheading{Parameters}\docparam{pos}{The position that should be visible.}\membersection{wxTextCtrl::Undo}\label{wxtextctrlundo}\func{virtual void}{Undo}{\void}If there is an undo facility and the last operation can be undone, undoes the last operation. Does nothingif there is no undo facility.\membersection{wxTextCtrl::WriteText}\label{wxtextctrlwritetext}\func{void}{WriteText}{\param{const wxString\& }{ text}}Writes the text into the text control at the current insertion position.\wxheading{Parameters}\docparam{text}{Text to write to the text control.}\wxheading{Remarks}Newlines in the text stringare the only control characters allowed, and they will cause appropriateline breaks.  See \helpref{wxTextCtrl::\cinsert}{wxtextctrlinsert} and \helpref{wxTextCtrl::AppendText}{wxtextctrlappendtext} for more convenient ways of writing to the window.After the write operation, the insertion point will be at the end of the inserted text, so subsequent write operations will be appended. To append text after the user may have interacted with the control, call \helpref{wxTextCtrl::SetInsertionPointEnd}{wxtextctrlsetinsertionpointend} before writing.\membersection{wxTextCtrl::XYToPosition}\label{wxtextctrlxytoposition}\func{long}{XYToPosition}{\param{long}{ x}, \param{long}{ y}}Converts the given zero based column and line number to a position.\wxheading{Parameters}\docparam{x}{The column number.}\docparam{y}{The line number.}\wxheading{Return value}The position value, or -1 if {\tt x} or {\tt y} was invalid.\membersection{wxTextCtrl::operator \cinsert}\label{wxtextctrlinsert}\func{wxTextCtrl\&}{operator \cinsert}{\param{const wxString\& }{s}}\func{wxTextCtrl\&}{operator \cinsert}{\param{int}{ i}}\func{wxTextCtrl\&}{operator \cinsert}{\param{long}{ i}}\func{wxTextCtrl\&}{operator \cinsert}{\param{float}{ f}}\func{wxTextCtrl\&}{operator \cinsert}{\param{double}{ d}}\func{wxTextCtrl\&}{operator \cinsert}{\param{char}{ c}}Operator definitions for appending to a text control, for example:\begin{verbatim}  wxTextCtrl *wnd = new wxTextCtrl(my_frame);  (*wnd) << "Welcome to text control number " << 1 << ".\n";\end{verbatim}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -