Inherits from
- Widget: enthought.pyface.widget.Widget
Attributes
- allow_column_sort
Sort data when a column header is clicked?
allow_column_sort = Bool(True)
- allow_row_sort
Sort data when a row header is clicked?
allow_row_sort = Bool(False)
- autosize
auto-size columns and rows? Probably the only time to set this to False is for very large data sets.
autosize = Bool(True)
- cell_activated
A cell has been activated (ie. double-clicked).
cell_activated = Event
- cell_begin_drag
A drag operation was started on a cell.
cell_begin_drag = Event
- cell_left_clicked
A left-click occurred on a cell.
cell_left_clicked = Event
- cell_right_clicked
A right-click occurred on a cell.
cell_right_clicked = Event
- column_label_height
pixel height of column labels
column_label_height = Int(32)
- default_cell_bg_color
The default background color to use for editable cells
default_cell_bg_color = Color('white')
- default_cell_font
The default font to use for text in cells
default_cell_font = Font(None)
- default_cell_read_only_color
The default background color to use for read-only cells default_cell_read_only_color = Trait(Color("linen"), None, Color)
default_cell_read_only_color = Color(wx.Colour(248, 247, 241))
- default_cell_text_color
The default text color to use for text in cells
default_cell_text_color = Color('black')
- default_label_bg_color
The default background color for labels
default_label_bg_color = Color(wx.Colour(236, 233, 216))
- default_label_font
The default font to use for text in labels
default_label_font = Font(None)
- default_label_text_color
The default text color for labels
default_label_text_color = Color('black')
- edit_on_first_click
Allow single-click access to cell-editors?
edit_on_first_click = Bool(False)
- enable_lines
Should sheet lines be shown on the table?
enable_lines = Bool(True)
- model
The model that provides the data for the sheet.
model = Instance(SheetModel, ())
- read_only
Should the sheet be read-only? If this is set to false, individual cells can still declare themselves read-only.
read_only = Bool(False)
- row_label_width
pixel width of row labels
row_label_width = Int(82)
- selection_bg_color
The color to use for a selection background
selection_bg_color = Color(wx.Colour(49, 106, 197))
- selection_changed
The current selection has changed.
selection_changed = Event
- selection_mode
Selection mode.
selection_mode = Enum('cell', 'rows', 'cols')
- selection_text_color
The color to use for a selection foreground/text
selection_text_color = Color(wx.Colour(255, 255, 255))
- sheet_line_color
The color to show sheetlines in
sheet_line_color = Color('blue')
- show_column_headers
Show column headers?
show_column_headers = Bool(True)
- show_row_headers
Show row headers?
show_row_headers = Bool(True)
Method summary
- __autosize(self)
- __fire_selection_changed(self, sel)
- __get_drag_value(self)
- __get_selected_rows_and_cols(self)
- __get_selection(self)
- __init__(self, parent, **traits)
- __initialize_columns(self, model)
- __initialize_counts(self, model)
- __initialize_fonts(self)
- __initialize_rows(self, model)
- __initialize_sort_state(self)
- __initialize_style_settings(self, event = None)
- __resolve_sheet_coords(self, x, y)
- get_selection(self)
- set_selection(self, selection_list)
- wx_drag_over(self, x, y, drag_object, drag_result)
- wx_dropped_on(self, x, y, drag_object, drag_result)
Methods
- __autosize(self)
Autosize the sheet with appropriate flags.
- __fire_selection_changed(self, sel)
- __get_drag_value(self)
Calculates the drag value based on the current selection.
- __get_selected_rows_and_cols(self)
Return lists of the selected rows and the selected columns.
- __get_selection(self)
Returns a list of values for the current selection.
- __init__(self, parent, **traits)
Creates a new sheet.
'parent' is the toolkit-specific control that is the sheet's parent.
- __initialize_columns(self, model)
Initialize the column headers.
- __initialize_counts(self, model)
Initializes the row and column counts.
- __initialize_fonts(self)
Initialize the label fonts.
- __initialize_rows(self, model)
Initialize the row headers.
- __initialize_sort_state(self)
Initializes the row and column counts.
- __initialize_style_settings(self, event = None)
- __resolve_sheet_coords(self, x, y)
Resolve the specified x and y coordinates into row/col coordinates. Returns row, col.
- get_selection(self)
Return a list of the currently selected objects.
- set_selection(self, selection_list)
Set the current selection to the objects listed in selection_list. Note that these objects are model-specific, as the sheet depends on the underlying model to translate these objects into sheet coordinates. A ValueError will be raised if the objects are not in the proper format for the underlying model.
- wx_drag_over(self, x, y, drag_object, drag_result)
- wx_dropped_on(self, x, y, drag_object, drag_result)