New API reference documentation is available for testing at http://thewinecellarbook.com/daboDocTestAlt/. Please report any problems or suggestions on the dabo-users mailing list.
Application
Read-only object reference to the Dabo Application object. (dApp). (inherited from dObject) |
BackColor
Color for the background of each cell in the column. |
BaseClass
The base Dabo class of the object. Read-only. (class) (inherited from dObject) |
BasePrefKey
Base key used when saving/restoring preferences (str) (inherited from dObject) |
Bottom
The position of the bottom side of the object. This is a convenience property, and is equivalent to setting the Top property to this value minus the Height of the control. (int) (inherited from dPemMixinBase) |
Caption
Specifies the caption displayed in this column's header. |
CellBackColor
Color for the background of the current cell in the column. |
CellFontBold
Specifies whether the current cell's font is bold-faced. |
CellForeColor
Color for the foreground (text) of the current cell in the column. |
Children
List of child objects. (inherited from dPemMixinBase) |
Class
The class the object is based on. Read-only. (class) (inherited from dObject) |
ColumnIndex
Return our column index in the grid, or -1. |
CustomEditorClass
Custom Editor class for this column. Default: None. Set this to override the default editor class, which Dabo will select based on the data type of the field. |
CustomEditors
Dictionary of custom editors for this column. Default: {}.
Set this to override the default editor class on a row-by-row basis.
If there is no custom editor class for a given row in CustomEditors,
the CustomEditor property setting will apply.
|
CustomListEditorChoices
Dictionary of custom list choices for this column. Default: {}.
Set this to override the default list choices on a row-by-row basis.
If there is no custom entry for a given row in CustomListEditorChoices,
the ListEditorChoices property setting will apply.
|
CustomRendererClass
Custom Renderer class for this column. Default: None. Set this to override the default renderer class, which Dabo will select based on the data type of the field. |
CustomRenderers
Dictionary of custom renderers for this column. Default: {}.
Set this to override the default renderer class on a row-by-row basis.
If there is no custom renderer for a given row in CustomRenderers, the
CustomRendererClass property setting will apply.
|
DataField
Field key in the data set to which this column is bound. (str) |
DataType
Description of the data type for this column (str) |
DynamicBackColor
Dynamically determine the value of the BackColor property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the BackColor property. If DynamicBackColor is set to None (the default), BackColor will not be dynamically evaluated. |
DynamicCaption
Dynamically determine the value of the Caption property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the Caption property. If DynamicCaption is set to None (the default), Caption will not be dynamically evaluated. |
DynamicCellBackColor
Dynamically determine the value of the CellBackColor property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the CellBackColor property. If DynamicCellBackColor is set to None (the default), CellBackColor will not be dynamically evaluated. |
DynamicCellFontBold
Dynamically determine the value of the CellFontBold property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the CellFontBold property. If DynamicCellFontBold is set to None (the default), CellFontBold will not be dynamically evaluated. |
DynamicCellForeColor
Dynamically determine the value of the CellForeColor property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the CellForeColor property. If DynamicCellForeColor is set to None (the default), CellForeColor will not be dynamically evaluated. |
DynamicCustomEditorClass
Dynamically determine the value of the CustomEditorClass property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the CustomEditorClass property. If DynamicCustomEditorClass is set to None (the default), CustomEditorClass will not be dynamically evaluated. |
DynamicCustomEditors
Dynamically determine the value of the CustomEditors property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the CustomEditors property. If DynamicCustomEditors is set to None (the default), CustomEditors will not be dynamically evaluated. |
DynamicCustomListEditorChoices
Dynamically determine the value of the CustomListEditorChoices property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the CustomListEditorChoices property. If DynamicCustomListEditorChoices is set to None (the default), CustomListEditorChoices will not be dynamically evaluated. |
DynamicCustomRendererClass
Dynamically determine the value of the CustomRendererClass property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the CustomRendererClass property. If DynamicCustomRendererClass is set to None (the default), CustomRendererClass will not be dynamically evaluated. |
DynamicCustomRenderers
Dynamically determine the value of the CustomRenderers property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the CustomRenderers property. If DynamicCustomRenderers is set to None (the default), CustomRenderers will not be dynamically evaluated. |
DynamicDataField
Dynamically determine the value of the DataField property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the DataField property. If DynamicDataField is set to None (the default), DataField will not be dynamically evaluated. |
DynamicDataType
Dynamically determine the value of the DataType property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the DataType property. If DynamicDataType is set to None (the default), DataType will not be dynamically evaluated. |
DynamicEditable
Dynamically determine the value of the Editable property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the Editable property. If DynamicEditable is set to None (the default), Editable will not be dynamically evaluated. |
DynamicFont
Dynamically determine the value of the Font property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the Font property. If DynamicFont is set to None (the default), Font will not be dynamically evaluated. |
DynamicFontBold
Dynamically determine the value of the FontBold property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the FontBold property. If DynamicFontBold is set to None (the default), FontBold will not be dynamically evaluated. |
DynamicFontFace
Dynamically determine the value of the FontFace property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the FontFace property. If DynamicFontFace is set to None (the default), FontFace will not be dynamically evaluated. |
DynamicFontItalic
Dynamically determine the value of the FontItalic property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the FontItalic property. If DynamicFontItalic is set to None (the default), FontItalic will not be dynamically evaluated. |
DynamicFontSize
Dynamically determine the value of the FontSize property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the FontSize property. If DynamicFontSize is set to None (the default), FontSize will not be dynamically evaluated. |
DynamicFontUnderline
Dynamically determine the value of the FontUnderline property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the FontUnderline property. If DynamicFontUnderline is set to None (the default), FontUnderline will not be dynamically evaluated. |
DynamicForeColor
Dynamically determine the value of the ForeColor property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the ForeColor property. If DynamicForeColor is set to None (the default), ForeColor will not be dynamically evaluated. |
DynamicHeaderBackColor
Dynamically determine the value of the HeaderBackColor property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the HeaderBackColor property. If DynamicHeaderBackColor is set to None (the default), HeaderBackColor will not be dynamically evaluated. |
DynamicHeaderFont
Dynamically determine the value of the HeaderFont property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the HeaderFont property. If DynamicHeaderFont is set to None (the default), HeaderFont will not be dynamically evaluated. |
DynamicHeaderFontBold
Dynamically determine the value of the HeaderFontBold property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the HeaderFontBold property. If DynamicHeaderFontBold is set to None (the default), HeaderFontBold will not be dynamically evaluated. |
DynamicHeaderFontFace
Dynamically determine the value of the HeaderFontFace property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the HeaderFontFace property. If DynamicHeaderFontFace is set to None (the default), HeaderFontFace will not be dynamically evaluated. |
DynamicHeaderFontItalic
Dynamically determine the value of the HeaderFontItalic property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the HeaderFontItalic property. If DynamicHeaderFontItalic is set to None (the default), HeaderFontItalic will not be dynamically evaluated. |
DynamicHeaderFontSize
Dynamically determine the value of the HeaderFontSize property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the HeaderFontSize property. If DynamicHeaderFontSize is set to None (the default), HeaderFontSize will not be dynamically evaluated. |
DynamicHeaderFontUnderline
Dynamically determine the value of the HeaderFontUnderline property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the HeaderFontUnderline property. If DynamicHeaderFontUnderline is set to None (the default), HeaderFontUnderline will not be dynamically evaluated. |
DynamicHeaderForeColor
Dynamically determine the value of the HeaderForeColor property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the HeaderForeColor property. If DynamicHeaderForeColor is set to None (the default), HeaderForeColor will not be dynamically evaluated. |
DynamicHeaderHorizontalAlignment
Dynamically determine the value of the HeaderHorizontalAlignment property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the HeaderHorizontalAlignment property. If DynamicHeaderHorizontalAlignment is set to None (the default), HeaderHorizontalAlignment will not be dynamically evaluated. |
DynamicHeaderVerticalAlignment
Dynamically determine the value of the HeaderVerticalAlignment property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the HeaderVerticalAlignment property. If DynamicHeaderVerticalAlignment is set to None (the default), HeaderVerticalAlignment will not be dynamically evaluated. |
DynamicHorizontalAlignment
Dynamically determine the value of the HorizontalAlignment property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the HorizontalAlignment property. If DynamicHorizontalAlignment is set to None (the default), HorizontalAlignment will not be dynamically evaluated. |
DynamicListEditorChoices
Dynamically determine the value of the ListEditorChoices property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the ListEditorChoices property. If DynamicListEditorChoices is set to None (the default), ListEditorChoices will not be dynamically evaluated. |
DynamicOrder
Dynamically determine the value of the Order property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the Order property. If DynamicOrder is set to None (the default), Order will not be dynamically evaluated. |
DynamicSearchable
Dynamically determine the value of the Searchable property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the Searchable property. If DynamicSearchable is set to None (the default), Searchable will not be dynamically evaluated. |
DynamicSortable
Dynamically determine the value of the Sortable property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the Sortable property. If DynamicSortable is set to None (the default), Sortable will not be dynamically evaluated. |
DynamicVerticalAlignment
Dynamically determine the value of the VerticalAlignment property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the VerticalAlignment property. If DynamicVerticalAlignment is set to None (the default), VerticalAlignment will not be dynamically evaluated. |
DynamicVisible
Dynamically determine the value of the Visible property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the Visible property. If DynamicVisible is set to None (the default), Visible will not be dynamically evaluated. |
DynamicWidth
Dynamically determine the value of the Width property. Specify a function and optional arguments that will get called from the update() method. The return value of the function will get set to the Width property. If DynamicWidth is set to None (the default), Width will not be dynamically evaluated. |
Editable
If True, and if the grid is set as Editable, the cell values in this column are editable by the user. If False, the cells in this column cannot be edited no matter what the grid setting is. When editable, incremental searching will not be enabled, regardless of the Searchable property setting. (bool) |
EditorClass
Returns the editor class used for cells in the column. This will be self.CustomEditorClass if set, or the default editor for the datatype of the field. (varies) |
Expand
Does this column expand/shrink as the grid width changes? Default=False (bool) |
Font
The font properties of the column's cells. (dFont) |
FontBold
Specifies if the cell font (for all cells in the column) is bold-faced. (bool) |
FontDescription
Human-readable description of the column's cell font settings. (str) |
FontFace
Specifies the font face for the column cells. (str) |
FontInfo
Specifies the platform-native font info string for the column cells. Read-only. (str) |
FontItalic
Specifies whether the column's cell font is italicized. (bool) |
FontSize
Specifies the point size of the column's cell font. (int) |
FontUnderline
Specifies whether cell text is underlined. (bool) |
ForeColor
Color for the foreground (text) of each cell in the column. |
Form
Object reference to the dForm containing the object. Read-only. (dForm). (inherited from dPemMixinBase) |
HeaderBackColor
Optional color for the background of the column header (str) |
HeaderFont
The font properties of the column's header. (dFont) |
HeaderFontBold
Specifies if the header font is bold-faced. (bool) |
HeaderFontDescription
Human-readable description of the current header font settings. (str) |
HeaderFontFace
Specifies the font face for the column header. (str) |
HeaderFontInfo
Specifies the platform-native font info string for the column header. Read-only. (str) |
HeaderFontItalic
Specifies whether the header font is italicized. (bool) |
HeaderFontSize
Specifies the point size of the header font. (int) |
HeaderFontUnderline
Specifies whether column header text is underlined. (bool) |
HeaderForeColor
Optional color for the foreground (text) of the column header (str) |
HeaderHorizontalAlignment
Specifies the horizontal alignment of the header caption. ('Left', 'Center', 'Right')
|
HeaderVerticalAlignment
Specifies the vertical alignment of the header caption. ('Top', 'Center', 'Bottom')
|
HorizontalAlignment
Horizontal alignment for all cells in this column. (str) Acceptable values are: 'Automatic': The cell's contents will align right for numeric data, left for text. (default) 'Left' 'Center' 'Right' |
ListEditorChoices
Specifies the list of choices that will appear in the list. Only applies if the DataType is set as "list". (list) |
LogEvents
Specifies which events to log. (list of strings) If the first element is 'All', all events except the following listed events will be logged. Event logging is resource-intensive, so in addition to setting this LogEvents property, you also need to make the following call: >>> dabo.eventLogging = True (inherited from dObject) |
Movable
Specifies whether this column is movable by the user. Note also the dGrid.MovableColumns property - if that is set to False, columns will not be movable even if their Movable property is set to True. |
Name
The name of the object. (str) (inherited from dObject) |
Order
Order of this column. Columns in the grid are arranged according to their relative Order. (int) |
Parent
The containing object. (obj) (inherited from dObject) |
Precision
Number of decimal places to display for float values (int) |
PreferenceManager
Reference to the Preference Management object (dPref) (inherited from dObject) |
RendererClass
Returns the renderer class used for cells in the column. This will be self.CustomRendererClass if set, or the default renderer class for the datatype of the field. (varies) |
Resizable
Specifies whether this column is resizable by the user. Note also the dGrid.ResizableColumns property - if that is set to False, columns will not be resizable even if their Resizable property is set to True. |
Right
The position of the right side of the object. This is a convenience property, and is equivalent to setting the Left property to this value minus the Width of the control. (int) (inherited from dPemMixinBase) |
Searchable
Specifies whether this column's incremental search is enabled. Default: True. The grid's Searchable property will override this setting. (bool) |
Sortable
Specifies whether this column can be sorted. Default: True. The grid's Sortable property will override this setting. (bool) |
Value
Returns the current value of the column from the underlying dataset or bizobj. |
VerticalAlignment
Vertical alignment for all cells in this column. Acceptable values are 'Top', 'Center', and 'Bottom'. (str) |
Visible
Controls whether the column is shown or not (bool) |
Width
Width of this column (int) |
WordWrap
When True, text longer than the column width will wrap to the next line (bool) |
addObject(self, classRef, Name=None, *args, **kwargs)
Create an instance of classRef, and make it a child of self. Abstract method: subclasses MUST override for UI-specifics. (inherited from dPemMixinBase) |
afterInit(self)
Subclass hook. Called after the object's __init__ has run fully. Subclasses should place their __init__ code here in this hook, instead of overriding __init__ directly, to avoid conflicting with base Dabo behavior. (inherited from dObject) |
autoBindEvents(self, force=True)
Automatically bind any on*() methods to the associated event. User code only needs to define the callback, and Dabo will automatically set up the event binding. This will satisfy lots of common cases where you want an object or its parent to respond to the object's events. To use this feature, just define a method on<EventName>(), or if you want a parent container to respond to the event, make a method in the parent on<EventName>_<object Name or RegID>(). For example:: class MyButton(dabo.ui.dButton): def onHit(self, evt): print "Hit!" class MyPanel(dabo.ui.dPanel): def afterInit(self): self.addObject(MyButton, RegID="btn1") def onHit_btn1(self, evt): print "panel: button hit!" When the button is pressed, you'll see both 'hit' messages because of auto event binding. If you want to bind your events explicitly, you can turn off auto event binding by calling:: dabo.autoBindEvents = False This feature is inspired by PythonCard. (inherited from EventMixin) |
beforeInit(self, *args, **kwargs)
Subclass hook. Called before the object is fully instantiated. Usually, user code should override afterInit() instead, but there may be cases where you need to set an attribute before the init stage is fully underway. (inherited from dObject) |
bindEvent(self, eventClass, function, _auto=False)
Bind a dEvent to a callback function. (inherited from EventMixin) |
bindEvents(self, bindings)
Bind a sequence of [dEvent, callback] lists. (inherited from EventMixin) |
clone(self, obj, name=None)
Abstract method: subclasses MUST override for UI-specifics. (inherited from dPemMixinBase) |
fontZoomIn(self, amt=1)
Zoom in on the font, by setting a higher point size. (inherited from dPemMixinBase) |
fontZoomNormal(self)
Reset the font zoom back to zero. (inherited from dPemMixinBase) |
fontZoomOut(self, amt=1)
Zoom out on the font, by setting a lower point size. (inherited from dPemMixinBase) |
getAbsoluteName(self)
Return the fully qualified name of the object. (inherited from dObject) |
getEditorClassForRow(self, row)
Return the cell editor class for the passed row. |
getListEditorChoicesForRow(self, row)
Return the list of choices for the list editor for the given row. |
getProperties(self, propertySequence=(), propsToSkip=(), ignoreErrors=False, *propertyArguments)
Returns a dictionary of property name/value pairs.
If a sequence of properties is passed, just those property values
will be returned. Otherwise, all property values will be returned.
The sequence of properties can be a list, tuple, or plain string
positional arguments. For instance, all of the following are
equivilent::
print self.getProperties("Caption", "FontInfo", "Form")
print self.getProperties(["Caption", "FontInfo", "Form"])
t = ("Caption", "FontInfo", "Form")
print self.getProperties(t)
print self.getProperties(\*t)
An exception will be raised if any passed property names don't
exist, aren't actual properties, or are not readable (do not have
getter functions).
However, if an exception is raised from the property getter function,
the exception will get caught and used as the property value in the
returned property dictionary. This allows the property list to be
returned even if some properties can't be evaluated correctly by the
object yet.
(inherited from PropertyHelperMixin) |
getRendererClassForRow(self, row)
Return the cell renderer class for the passed row. |
initEvents(self)
Hook for subclasses. User code should do custom event binding here, such as:: self.bindEvent(dEvents.GotFocus, self.customGotFocusHandler) (inherited from dObject) |
initProperties(self)
Hook for subclasses. User subclasses should set properties here, such as:: self.Name = "MyTextBox" self.BackColor = (192,192,192) (inherited from dObject) |
iterateCall(self, funcName, *args, **kwargs)
Call the given function on this object and all of its Children. If any object does not have the given function, no error is raised; it is simply ignored. (inherited from dPemMixinBase) |
raiseEvent(self, eventClass, uiEvent=None, *args, **kwargs)
Send the event to all registered listeners. If uiEvent is sent, dEvents.Event will be able to parse it for useful information to send along to the callback. Additional arguments, if any, are sent along to the constructor of the event. While this feature exists so that UI-lib event handlers can pass along information (such as the keystroke information in a key event), user code may pass along additional arguments as well, which will exist in the event.EventData dictionary property. In most cases, user code should call raiseEvent() with the event class (dEvents.Hit, for example) as the only parameter. (inherited from EventMixin) |
reCreate(self, child=None)
Abstract method: subclasses MUST override for UI-specifics. (inherited from dPemMixinBase) |
refresh(self)
Abstract method. (inherited from dPemMixinBase) |
release(self)
Usually don't need this, but it helps to keep this in line with other Dabo objects. |
setProperties(self, propDict={}, ignoreErrors=False, **propKw)
Sets a group of properties on the object all at once.
You have the following options for sending the properties:
1) Property/Value pair dictionary
2) Keyword arguments
3) Both
The following examples all do the same thing::
self.setProperties(FontBold=True, ForeColor="Red")
self.setProperties({"FontBold": True, "ForeColor": "Red"})
self.setProperties({"FontBold": True}, ForeColor="Red")
(inherited from PropertyHelperMixin) |
setPropertiesFromAtts(self, propDict={}, ignoreExtra=True, context=None)
Sets a group of properties on the object all at once. This is different from the regular setProperties() method because it only accepts a dict containing prop:value pairs, and it assumes that the value is always a string. It will convert the value to the correct type for the property, and then set the property to that converted value. If the value needs to be evaluated in a specific namespace, pass that as the 'context' parameter. (inherited from PropertyHelperMixin) |
unbindEvent(self, eventClass=None, function=None)
Remove a previously registered event binding. Removes all registrations that exist for the given binding for this object. If event is None, all bindings for the passed function are removed. If function is None, all bindings for the passed event are removed. If both event and function are None, all event bindings are removed. (inherited from EventMixin) |