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

📄 comboctrl.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
📖 第 1 页 / 共 2 页
字号:
Returns features supported by wxComboCtrl. If needed feature is missing,you need to instead use wxGenericComboCtrl, which however may lacknative look and feel (but otherwise sports identical API).\wxheading{Return value}Value returned is a combination of following flags:\twocolwidtha{8cm}%\begin{twocollist}\itemsep=0pt\twocolitem{{\tt wxComboCtrlFeatures::MovableButton}}{Button canbe on either side of the control.}\twocolitem{{\tt wxComboCtrlFeatures::BitmapButton}}{Button maybe replaced with bitmap.}\twocolitem{{\tt wxComboCtrlFeatures::ButtonSpacing}}{Button canhave spacing.}\twocolitem{{\tt wxComboCtrlFeatures::TextIndent}}{SetTextIndentworks.}\twocolitem{{\tt wxComboCtrlFeatures::PaintControl}}{Combo controlitself can be custom painted.}\twocolitem{{\tt wxComboCtrlFeatures::PaintWritable}}{A variable-width area in front of writable combo control's textctrl canbe custom painted.}\twocolitem{{\tt wxComboCtrlFeatures::Borderless}}{wxNO\_BORDERwindow style works.}\twocolitem{{\tt wxComboCtrlFeatures::All}}{All of theabove.}\end{twocollist}\membersection{wxComboCtrl::GetInsertionPoint}\label{wxcomboctrlgetinsertionpoint}\constfunc{long}{GetInsertionPoint}{\void}Returns the insertion point for the combo control's text field.\textbf{Note:} Under wxMSW, this function always returns $0$ if the combo controldoesn't have the focus.\membersection{wxComboCtrl::IsPopupWindowState}\label{wxcomboctrlispopupwindowstate}\constfunc{bool}{IsPopupWindowState}{\param{int }{state}}Returns \true if the popup window is in the given state.Possible values are:\twocolwidtha{8cm}%\begin{twocollist}\itemsep=0pt\twocolitem{{\tt wxComboCtrl::Hidden}}{Popup window is hidden.}\twocolitem{{\tt wxComboCtrl::Animating}}{Popup window is being shown, but thepopup animation has not yet finished.}\twocolitem{{\tt wxComboCtrl::Visible}}{Popup window is fully visible.}\end{twocollist}\membersection{wxComboCtrl::GetLastPosition}\label{wxcomboctrlgetlastposition}\constfunc{long}{GetLastPosition}{\void}Returns the last position in the combo control text field.\membersection{wxComboCtrl::GetPopupControl}\label{wxcomboctrlgetpopupcontrol}\func{wxComboPopup*}{GetPopupControl}{\void}Returns current popup interface that has been set with SetPopupControl.\membersection{wxComboCtrl::GetPopupWindow}\label{wxcomboctrlgetpopupwindow}\constfunc{wxWindow*}{GetPopupWindow}{\void}Returns popup window containing the popup control.\membersection{wxComboCtrl::GetTextCtrl}\label{wxcomboctrlgettextctrl}\constfunc{wxTextCtrl*}{GetTextCtrl}{\void}Get the text control which is part of the combo control.\membersection{wxComboCtrl::GetTextIndent}\label{wxcomboctrlgettextindent}\constfunc{wxCoord}{GetTextIndent}{\void}Returns actual indentation in pixels.\membersection{wxComboCtrl::GetTextRect}\label{wxcomboctrlgettextrect}\constfunc{const wxRect\&}{GetTextRect}{\void}Returns area covered by the text field (includes everything exceptborders and the dropdown button).\membersection{wxComboCtrl::GetValue}\label{wxcomboctrlgetvalue}\constfunc{wxString}{GetValue}{\void}Returns text representation of the current value. For writablecombo control it always returns the value in the text field.\membersection{wxComboCtrl::HidePopup}\label{wxcomboctrlhidepopup}\func{void}{HidePopup}{\void}Dismisses the popup window.\membersection{wxComboCtrl::IsPopupShown}\label{wxcomboctrlispopupshown}\constfunc{bool}{IsPopupShown}{\void}Returns \true if the popup is currently shown\membersection{wxComboCtrl::OnButtonClick}\label{wxcomboctrlonbuttonclick}\func{void}{OnButtonClick}{\void}Implement in a derived class to define what happens ondropdown button click.Default action is to show the popup.\textbf{Note:} If you implement this to do something else thanshow the popup, you must then also implement\helpref{DoSetPopupControl}{wxcomboctrldosetpopupcontrol} to alwaysreturn NULL.\membersection{wxComboCtrl::Paste}\label{wxcomboctrlpaste}\func{void}{Paste}{\void}Pastes text from the clipboard to the text field.\membersection{wxComboCtrl::Remove}\label{wxcomboctrlremove}\func{void}{Remove}{\param{long }{from}, \param{long }{to}}Removes the text between the two positions in the combo control text field.\wxheading{Parameters}\docparam{from}{The first position.}\docparam{to}{The last position.}\membersection{wxComboCtrl::Replace}\label{wxcomboctrlreplace}\func{void}{Replace}{\param{long }{from}, \param{long }{to}, \param{const wxString\& }{value}}Replaces the text between two positions with the given text, in the combo control text field.\wxheading{Parameters}\docparam{from}{The first position.}\docparam{to}{The second position.}\docparam{text}{The text to insert.}\membersection{wxComboCtrl::SetButtonBitmaps}\label{wxcomboctrlsetbuttonbitmaps}\func{void}{SetButtonBitmaps}{\param{const wxBitmap\& }{bmpNormal}, \param{bool }{pushButtonBg = false}, \param{const wxBitmap\& }{bmpPressed = wxNullBitmap}, \param{const wxBitmap\& }{bmpHover = wxNullBitmap}, \param{const wxBitmap\& }{bmpDisabled = wxNullBitmap}}Sets custom dropdown button graphics.\wxheading{Parameters}\docparam{bmpNormal}{Default button image.}\docparam{pushButtonBg}{If \true, blank push button background is paintedbelow the image.}\docparam{bmpPressed}{Depressed button image.}\docparam{bmpHover}{Button image when mouse hovers above it. Thisshould be ignored on platforms and themes that do not generally drawdifferent kind of button on mouse hover.}\docparam{bmpDisabled}{Disabled button image.}\membersection{wxComboCtrl::SetButtonPosition}\label{wxcomboctrlsetbuttonposition}\func{void}{SetButtonPosition}{\param{int }{width = -1}, \param{int }{height = -1}, \param{int }{side = wxRIGHT}, \param{int }{spacingX = 0}}Sets size and position of dropdown button.\wxheading{Parameters}\docparam{width}{Button width. Value <= $0$ specifies default.}\docparam{height}{Button height. Value <= $0$ specifies default.}\docparam{side}{Indicates which side the button will be placed.Value can be {\tt wxLEFT} or {\tt wxRIGHT}.}\docparam{spacingX}{Horizontal spacing around the button. Default is $0$.}\membersection{wxComboCtrl::SetCustomPaintWidth}\label{wxcomboctrlsetcustompaintwidth}\func{void}{SetCustomPaintWidth}{\param{int }{width}}Set width, in pixels, of custom painted area in control without {\tt wxCB\_READONLY}style. In read-only \helpref{wxOwnerDrawnComboBox}{wxownerdrawncombobox}, this is usedto indicate area that is not covered by the focus rectangle.\membersection{wxComboCtrl::SetInsertionPoint}\label{wxcomboctrlsetinsertionpoint}\func{void}{SetInsertionPoint}{\param{long }{pos}}Sets the insertion point in the text field.\wxheading{Parameters}\docparam{pos}{The new insertion point.}\membersection{wxComboCtrl::SetInsertionPointEnd}\label{wxcomboctrlsetinsertionpointend}\func{void}{SetInsertionPointEnd}{\void}Sets the insertion point at the end of the combo control text field.\membersection{wxComboCtrl::SetPopupAnchor}\label{wxcomboctrlsetpopupanchor}\func{void}{SetPopupAnchor}{\param{int }{anchorSide}}Set side of the control to which the popup will align itself. Valid values are{\tt wxLEFT}, {\tt wxRIGHT} and $0$. The default value $0$ means that the most appropriateside is used (which, currently, is always {\tt wxLEFT}).\membersection{wxComboCtrl::SetPopupControl}\label{wxcomboctrlsetpopupcontrol}\func{void}{SetPopupControl}{\param{wxComboPopup* }{popup}}Set popup interface class derived from wxComboPopup.This method should be called as soon as possible after the controlhas been created, unless \helpref{OnButtonClick}{wxcomboctrlonbuttonclick}has been overridden.\membersection{wxComboCtrl::SetPopupExtents}\label{wxcomboctrlsetpopupextents}\func{void}{SetPopupExtents}{\param{int }{extLeft}, \param{int }{extRight}}Extends popup size horizontally, relative to the edges of the combo control.\wxheading{Parameters}\docparam{extLeft}{How many pixel to extend beyond the left edge of thecontrol. Default is $0$.}\docparam{extRight}{How many pixel to extend beyond the right edge of thecontrol. Default is $0$.}\wxheading{Remarks}Popup minimum width may override arguments.It is up to the popup to fully take this into account.\membersection{wxComboCtrl::SetPopupMaxHeight}\label{wxcomboctrlsetpopupmaxheight}\func{void}{SetPopupMaxHeight}{\param{int }{height}}Sets preferred maximum height of the popup.\wxheading{Remarks}Value -1 indicates the default.Also, popup implementation may choose to ignore this.\membersection{wxComboCtrl::SetPopupMinWidth}\label{wxcomboctrlsetpopupminwidth}\func{void}{SetPopupMinWidth}{\param{int }{width}}Sets minimum width of the popup. If wider than combo control, it will extend to the left.\wxheading{Remarks}Value -1 indicates the default.Also, popup implementation may choose to ignore this.\membersection{wxComboCtrl::SetSelection}\label{wxcomboctrlsetselection}\func{void}{SetSelection}{\param{long }{from}, \param{long }{to}}Selects the text between the two positions, in the combo control text field.\wxheading{Parameters}\docparam{from}{The first position.}\docparam{to}{The second position.}\membersection{wxComboCtrl::SetText}\label{wxcomboctrlsettext}\func{void}{SetText}{\param{const wxString\& }{value}}Sets the text for the text field without affecting thepopup. Thus, unlike \helpref{SetValue}{wxcomboctrlsetvalue}, it worksequally well with combo control using {\tt wxCB\_READONLY} style.\membersection{wxComboCtrl::SetTextIndent}\label{wxcomboctrlsettextindent}\func{void}{SetTextIndent}{\param{int }{indent}}This will set the space in pixels between left edge of the control and thetext, regardless whether control is read-only or not. Value -1 can begiven to indicate platform default.\membersection{wxComboCtrl::SetValue}\label{wxcomboctrlsetvalue}\func{void}{SetValue}{\param{const wxString\& }{value}}Sets the text for the combo control text field.{\bf NB:} For a combo control with {\tt wxCB\_READONLY} style thestring must be accepted by the popup (for instance, exist in the dropdownlist), otherwise the call to SetValue() is ignored\membersection{wxComboCtrl::SetValueWithEvent}\label{wxcomboctrlsetvaluewithevent}\func{void}{SetValueWithEvent}{\param{const wxString\& }{value}, \param{bool }{withEvent = true}}Same as SetValue, but also sends wxCommandEvent of type wxEVT\_COMMAND\_TEXT\_UPDATEDif {\tt withEvent} is \true.\membersection{wxComboCtrl::ShowPopup}\label{wxcomboctrlshowpopup}\func{void}{ShowPopup}{\void}Show the popup.\membersection{wxComboCtrl::Undo}\label{wxcomboctrlundo}\func{void}{Undo}{\void}Undoes the last edit in the text field. Windows only.\membersection{wxComboCtrl::UseAltPopupWindow}\label{wxcomboctrlusealtpopupwindow}\func{void}{UseAltPopupWindow}{\param{bool }{enable = true}}Enable or disable usage of an alternative popup window, which guaranteesability to focus the popup control, and allows common native controls tofunction normally. This alternative popup window is usually a wxDialog,and as such, when it is shown, its parent top-level window will appearas if the focus has been lost from it.

⌨️ 快捷键说明

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