Package wx :: Class PickerBase
[frames | no frames]

Type PickerBase

object --+                
         |                
    Object --+            
             |            
    EvtHandler --+        
                 |        
            Window --+    
                     |    
               Control --+
                         |
                        PickerBase

Known Subclasses:
ColourPickerCtrl, DirPickerCtrl, FilePickerCtrl, FontPickerCtrl

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 wx.BoxSizer would do, with the text control on the left of the picker button and the proportion of the picker fixed to value 1.


Method Summary
  __init__(self)
bool CreateBase(self, parent, id, text, pos, size, style, validator, name)
int GetInternalMargin(self)
Returns the margin (in pixels) between the picker and the text control.
Control GetPickerCtrl(self)
int GetPickerCtrlProportion(self)
Gets the proportion value of the picker.
TextCtrl GetTextCtrl(self)
Returns a pointer to the text control handled by this class or None if the wx.PB_USE_TEXTCTRL style was not specified when this control was created.
int GetTextCtrlProportion(self)
Returns the proportion between the text control and the picker.
bool HasTextCtrl(self)
Returns true if this class has a valid text control (i.e.
bool IsPickerCtrlGrowable(self)
bool IsTextCtrlGrowable(self)
  SetInternalMargin(self, newmargin)
Sets the margin (in pixels) between the picker and the text control.
  SetPickerCtrlGrowable(self, grow)
  SetPickerCtrlProportion(self, prop)
Sets the proportion value of the picker.
  SetTextCtrlGrowable(self, grow)
  SetTextCtrlProportion(self, prop)
Sets the proportion between the text control and the picker button.

Property Summary
  InternalMargin: See GetInternalMargin and SetInternalMargin
  PickerCtrl: See GetPickerCtrl
  PickerCtrlGrowable: See IsPickerCtrlGrowable and SetPickerCtrlGrowable
  PickerCtrlProportion: See GetPickerCtrlProportion and SetPickerCtrlProportion
  TextCtrl: See GetTextCtrl
  TextCtrlGrowable: See IsTextCtrlGrowable and SetTextCtrlGrowable
  TextCtrlProportion: See GetTextCtrlProportion and SetTextCtrlProportion
  thisown: The membership flag

Instance Method Details

GetInternalMargin(self)

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

Returns:
int

GetPickerCtrlProportion(self)

Gets the proportion value of the picker.

Returns:
int

GetTextCtrl(self)

Returns a pointer to the text control handled by this class or None if the wx.PB_USE_TEXTCTRL style was not specified when this control was created.

Very important: 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. wx.ColourPickerCtrl.GetColour, wx.FilePickerCtrl.GetPath, etc).

Returns:
TextCtrl

GetTextCtrlProportion(self)

Returns the proportion between the text control and the picker.

Returns:
int

HasTextCtrl(self)

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

Returns:
bool

SetInternalMargin(self, newmargin)

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

Parameters:
newmargin
           (type=int)

SetPickerCtrlProportion(self, prop)

Sets the proportion value of the picker.

Parameters:
prop
           (type=int)

SetTextCtrlProportion(self, prop)

Sets the proportion between the text control and the picker button. This is used to set relative sizes of the text contorl and the picker. The value passed to this function must be >= 1.

Parameters:
prop
           (type=int)


Property Details

InternalMargin

See GetInternalMargin and SetInternalMargin

Get Method:
GetInternalMargin(self)
Set Method:
SetInternalMargin(self, newmargin)

PickerCtrl

See GetPickerCtrl

Get Method:
GetPickerCtrl(self)

PickerCtrlGrowable

See IsPickerCtrlGrowable and SetPickerCtrlGrowable

Get Method:
IsPickerCtrlGrowable(self)
Set Method:
SetPickerCtrlGrowable(self, grow)

PickerCtrlProportion

See GetPickerCtrlProportion and SetPickerCtrlProportion

Get Method:
GetPickerCtrlProportion(self)
Set Method:
SetPickerCtrlProportion(self, prop)

TextCtrl

See GetTextCtrl

Get Method:
GetTextCtrl(self)

TextCtrlGrowable

See IsTextCtrlGrowable and SetTextCtrlGrowable

Get Method:
IsTextCtrlGrowable(self)
Set Method:
SetTextCtrlGrowable(self, grow)

TextCtrlProportion

See GetTextCtrlProportion and SetTextCtrlProportion

Get Method:
GetTextCtrlProportion(self)
Set Method:
SetTextCtrlProportion(self, prop)

thisown

The membership flag


Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:11:57 2007 http://epydoc.sf.net