wxSearchCtrl Class Reference
[Controls]

#include <wx/srchctrl.h>

Inheritance diagram for wxSearchCtrl:
Inheritance graph
[legend]

Detailed Description

A search control is a composite control with a search button, a text control, and a cancel button.

Styles

This class supports the following styles:

Events emitted by this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxCommandEvent& event)

Event macros for events emitted by this class:

To retrieve actual search queries, use EVT_TEXT and EVT_TEXT_ENTER events, just as you would with wxTextCtrl.

Library:  wxCore
Category:  Controls

Appearance:
wxMSW appearancewxGTK appearancewxMac appearance
wxMSW appearancewxGTK appearancewxMac appearance
See also:
wxTextCtrl::Create, wxValidator

Public Member Functions

 wxSearchCtrl ()
 Default constructor.
 wxSearchCtrl (wxWindow *parent, wxWindowID id, const wxString &value=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxSearchCtrlNameStr)
 Constructor, creating and showing a text control.
virtual ~wxSearchCtrl ()
 Destructor, destroying the search control.
virtual wxMenuGetMenu ()
 Returns a pointer to the search control's menu object or NULL if there is no menu attached.
virtual bool IsSearchButtonVisible () const
 Returns the search button visibility value.
virtual void SetMenu (wxMenu *menu)
 Sets the search control's menu object.
virtual void ShowCancelButton (bool show)
 Shows or hides the cancel button.
virtual void ShowSearchButton (bool show)
 Sets the search button visibility value on the search control.

List of all members.


Constructor & Destructor Documentation

wxSearchCtrl::wxSearchCtrl (  ) 

Default constructor.

wxSearchCtrl::wxSearchCtrl ( wxWindow parent,
wxWindowID  id,
const wxString value = wxEmptyString,
const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize,
long  style = 0,
const wxValidator validator = wxDefaultValidator,
const wxString name = wxSearchCtrlNameStr 
)

Constructor, creating and showing a text control.

Parameters:
parent Parent window. Should not be NULL.
id Control identifier. A value of -1 denotes a default value.
value Default text value.
pos Text control position.
size Text control size.
style Window style. See wxSearchCtrl.
validator Window validator.
name Window name.
See also:
wxTextCtrl::Create, wxValidator
virtual wxSearchCtrl::~wxSearchCtrl (  )  [virtual]

Destructor, destroying the search control.


Member Function Documentation

virtual wxMenu* wxSearchCtrl::GetMenu (  )  [virtual]

Returns a pointer to the search control's menu object or NULL if there is no menu attached.

virtual bool wxSearchCtrl::IsSearchButtonVisible (  )  const [virtual]

Returns the search button visibility value.

If there is a menu attached, the search button will be visible regardless of the search button visibility value.

This always returns false in Mac OS X v10.3

virtual void wxSearchCtrl::SetMenu ( wxMenu menu  )  [virtual]

Sets the search control's menu object.

If there is already a menu associated with the search control it is deleted.

Parameters:
menu Menu to attach to the search control.
virtual void wxSearchCtrl::ShowCancelButton ( bool  show  )  [virtual]

Shows or hides the cancel button.

virtual void wxSearchCtrl::ShowSearchButton ( bool  show  )  [virtual]

Sets the search button visibility value on the search control.

If there is a menu attached, the search button will be visible regardless of the search button visibility value.

This has no effect in Mac OS X v10.3

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



wxWidgets logo

[ top ]