wxPickerBase Class Reference
[Picker Controls]

#include <wx/pickerbase.h>

Inheritance diagram for wxPickerBase:

wxControl wxWindow wxEvtHandler wxObject wxColourPickerCtrl wxDirPickerCtrl wxFilePickerCtrl wxFontPickerCtrl

List of all members.


Detailed Description

Base abstract class for all pickers which support an auxiliary text control.

This class handles all positioning and sizing of the text control like a an horizontal wxBoxSizer would do, with the text control on the left of the picker button.

The proportion (see wxSizer documentation for more info about proportion values) of the picker control defaults to 1 when there isn't a text control associated (see wxPB_USE_TEXTCTRL style) and to 0 otherwise.

Styles:

Library:  wxCore

Category:  Picker Controls

See also:
wxColourPickerCtrl

Public Member Functions

int GetInternalMargin () const
int GetPickerCtrlProportion () const
wxTextCtrlGetTextCtrl ()
int GetTextCtrlProportion () const
bool HasTextCtrl () const
bool IsPickerCtrlGrowable () const
bool IsTextCtrlGrowable () const
void SetInternalMargin (int margin)
void SetPickerCtrlGrowable (bool grow=true)
void SetPickerCtrlProportion (int prop)
void SetTextCtrlGrowable (bool grow=true)
void SetTextCtrlProportion (int prop)

Member Function Documentation

int wxPickerBase::GetInternalMargin (  )  const

Returns the margin (in pixel) between the picker and the text control.

This function can be used only when HasTextCtrl() returns true.

int wxPickerBase::GetPickerCtrlProportion (  )  const

Returns the proportion value of the picker.

wxTextCtrl* wxPickerBase::GetTextCtrl (  ) 

Returns a pointer to the text control handled by this window or NULL if the wxPB_USE_TEXTCTRL style was not specified when this control was created.

Remarks:
The contents of the text control could be containing an invalid representation of the entity which can be chosen through the picker (e.g. the user entered an invalid colour syntax because of a typo). Thus you should never parse the content of the textctrl to get the user's input; rather use the derived-class getter (e.g. wxColourPickerCtrl::GetColour(), wxFilePickerCtrl::GetPath(), etc).

int wxPickerBase::GetTextCtrlProportion (  )  const

Returns the proportion value of the text control.

This function can be used only when HasTextCtrl() returns true.

bool wxPickerBase::HasTextCtrl (  )  const

Returns true if this window has a valid text control (i.e. if the wxPB_USE_TEXTCTRL style was given when creating this control).

bool wxPickerBase::IsPickerCtrlGrowable (  )  const

Returns true if the picker control is growable.

bool wxPickerBase::IsTextCtrlGrowable (  )  const

Returns true if the text control is growable.

This function can be used only when HasTextCtrl() returns true.

void wxPickerBase::SetInternalMargin ( int  margin  ) 

Sets the margin (in pixel) between the picker and the text control.

This function can be used only when HasTextCtrl() returns true.

void wxPickerBase::SetPickerCtrlGrowable ( bool  grow = true  ) 

Sets the picker control as growable when grow is true.

void wxPickerBase::SetPickerCtrlProportion ( int  prop  ) 

Sets the proportion value of the picker.

Look at the detailed description of wxPickerBase for more info.

void wxPickerBase::SetTextCtrlGrowable ( bool  grow = true  ) 

Sets the text control as growable when grow is true.

This function can be used only when HasTextCtrl() returns true.

void wxPickerBase::SetTextCtrlProportion ( int  prop  ) 

Sets the proportion value of the text control.

Look at the detailed description of wxPickerBase for more info.

This function can be used only when HasTextCtrl() returns true.



wxWidgets logo

[ top ]