Package wx :: Module grid :: Class Grid
[frames | no frames]

Type Grid

object --+                    
         |                    
    Object --+                
             |                
    EvtHandler --+            
                 |            
            Window --+        
                     |        
                 Panel --+    
                         |    
            ScrolledWindow --+
                             |
                            Grid

Known Subclasses:
CSheet

Proxy of C++ Grid class
Method Summary
Window __init__(self, parent, id, pos, size, style, name)
Construct and show a generic Window.
  __repr__(self)
bool AppendCols(self, numCols, updateLabels)
bool AppendRows(self, numRows, updateLabels)
  AutoSize(self)
  AutoSizeColLabelSize(self, col)
  AutoSizeColumn(self, col, setAsMin)
  AutoSizeColumns(self, setAsMin)
  AutoSizeRow(self, row, setAsMin)
  AutoSizeRowLabelSize(self, row)
  AutoSizeRows(self, setAsMin)
  BeginBatch(self)
Rect BlockToDeviceRect(self, topLeft, bottomRight)
bool CanDragCell(self)
bool CanDragColSize(self)
bool CanDragGridSize(self)
bool CanDragRowSize(self)
bool CanEnableCellControl(self)
Rect CellToRect(self, row, col)
  ClearGrid(self)
  ClearSelection(self)
bool Create(self, parent, id, pos, size, style, name)
Create the GUI part of the Window for 2-phase creation mode.
bool CreateGrid(self, numRows, numCols, selmode)
bool DeleteCols(self, pos, numCols, updateLabels)
bool DeleteRows(self, pos, numRows, updateLabels)
  DeselectCell(self, row, col)
  DeselectCol(self, col)
  DeselectRow(self, row)
  DisableCellEditControl(self)
  DisableDragCell(self)
  DisableDragColSize(self)
  DisableDragGridSize(self)
  DisableDragRowSize(self)
  DrawCellHighlight(self, dc, attr)
  DrawTextRectangle(*args, **kwargs)
int verticalAlignment=TOP, int textOrientation=HORIZONTAL)
  EnableCellEditControl(self, enable)
  EnableDragCell(self, enable)
  EnableDragColSize(self, enable)
  EnableDragGridSize(self, enable)
  EnableDragRowSize(self, enable)
  EnableEditing(self, edit)
  EnableGridLines(self, enable)
  EndBatch(self)
  ForceRefresh(self)
int GetBatchCount(self)
(horiz, vert) GetCellAlignment()
Colour GetCellBackgroundColour(self, row, col)
GridCellEditor GetCellEditor(self, row, col)
Font GetCellFont(self, row, col)
Colour GetCellHighlightColour(self)
int GetCellHighlightPenWidth(self)
int GetCellHighlightROPenWidth(self)
bool GetCellOverflow(self, row, col)
GridCellRenderer GetCellRenderer(self, row, col)
(num_rows, num_cols) GetCellSize(row, col)
Colour GetCellTextColour(self, row, col)
String GetCellValue(self, row, col)
VisualAttributes GetClassDefaultAttributes(variant)
Get the default attributes for this class. (Static method)
(horiz, vert) GetColLabelAlignment()
int GetColLabelSize(self)
int GetColLabelTextOrientation(self)
String GetColLabelValue(self, col)
int GetColMinimalAcceptableWidth(self)
int GetColSize(self, col)
(horiz, vert) GetDefaultCellAlignment()
Colour GetDefaultCellBackgroundColour(self)
Font GetDefaultCellFont(self)
bool GetDefaultCellOverflow(self)
Colour GetDefaultCellTextColour(self)
int GetDefaultColLabelSize(self)
int GetDefaultColSize(self)
GridCellEditor GetDefaultEditor(self)
GridCellEditor GetDefaultEditorForCell(self, row, col)
GridCellEditor GetDefaultEditorForType(self, typeName)
GridCellRenderer GetDefaultRenderer(self)
GridCellRenderer GetDefaultRendererForCell(self, row, col)
GridCellRenderer GetDefaultRendererForType(self, typeName)
int GetDefaultRowLabelSize(self)
int GetDefaultRowSize(self)
Window GetGridColLabelWindow(self)
Window GetGridCornerLabelWindow(self)
int GetGridCursorCol(self)
int GetGridCursorRow(self)
Colour GetGridLineColour(self)
Window GetGridRowLabelWindow(self)
Window GetGridWindow(self)
Colour GetLabelBackgroundColour(self)
Font GetLabelFont(self)
Colour GetLabelTextColour(self)
int GetNumberCols(self)
int GetNumberRows(self)
GridCellAttr GetOrCreateCellAttr(self, row, col)
(horiz, vert) GetRowLabelAlignment()
int GetRowLabelSize(self)
String GetRowLabelValue(self, row)
int GetRowMinimalAcceptableHeight(self)
int GetRowSize(self, row)
int GetScrollLineX(self)
int GetScrollLineY(self)
int GetScrollX(self, x)
int GetScrollY(self, y)
wxGridCellCoordsArray GetSelectedCells(self)
wxArrayInt GetSelectedCols(self)
wxArrayInt GetSelectedRows(self)
Colour GetSelectionBackground(self)
wxGridCellCoordsArray GetSelectionBlockBottomRight(self)
wxGridCellCoordsArray GetSelectionBlockTopLeft(self)
Colour GetSelectionForeground(self)
WXGRIDSELECTIONMODES GetSelectionMode(self)
GridTableBase GetTable(self)
(width, height) GetTextBoxSize(dc, lines)
bool GridLinesEnabled(self)
  HideCellEditControl(self)
bool InsertCols(self, pos, numCols, updateLabels)
bool InsertRows(self, pos, numRows, updateLabels)
bool IsCellEditControlEnabled(self)
bool IsCellEditControlShown(self)
bool IsCurrentCellReadOnly(self)
bool IsEditable(self)
bool IsInSelection(self, row, col)
bool IsReadOnly(self, row, col)
bool IsSelection(self)
bool IsVisible(self, row, col, wholeCellVisible)
  MakeCellVisible(self, row, col)
bool MoveCursorDown(self, expandSelection)
bool MoveCursorDownBlock(self, expandSelection)
bool MoveCursorLeft(self, expandSelection)
bool MoveCursorLeftBlock(self, expandSelection)
bool MoveCursorRight(self, expandSelection)
bool MoveCursorRightBlock(self, expandSelection)
bool MoveCursorUp(self, expandSelection)
bool MoveCursorUpBlock(self, expandSelection)
bool MovePageDown(self)
bool MovePageUp(self)
  ProcessTableMessage(*args, **kwargs)
ProcessTableMessage(self, GridTableMessage ??) -> bool
  RegisterDataType(self, typeName, renderer, editor)
  SaveEditControlValue(self)
  SelectAll(self)
  SelectBlock(self, topRow, leftCol, bottomRow, rightCol, addToSelected)
  SelectCol(self, col, addToSelected)
  SelectRow(self, row, addToSelected)
  SetAttr(self, row, col, attr)
  SetCellAlignment(self, row, col, horiz, vert)
  SetCellBackgroundColour(*args, **kwargs)
SetCellBackgroundColour(self, int row, int col, Colour ??)
  SetCellEditor(self, row, col, editor)
  SetCellFont(*args, **kwargs)
SetCellFont(self, int row, int col, Font ??)
  SetCellHighlightColour(*args, **kwargs)
SetCellHighlightColour(self, Colour ??)
  SetCellHighlightPenWidth(self, width)
  SetCellHighlightROPenWidth(self, width)
  SetCellOverflow(self, row, col, allow)
  SetCellRenderer(self, row, col, renderer)
  SetCellSize(self, row, col, num_rows, num_cols)
  SetCellTextColour(*args, **kwargs)
SetCellTextColour(self, int row, int col, Colour ??)
  SetCellValue(self, row, col, s)
  SetColAttr(self, col, attr)
  SetColFormatBool(self, col)
  SetColFormatCustom(self, col, typeName)
  SetColFormatFloat(self, col, width, precision)
  SetColFormatNumber(self, col)
  SetColLabelAlignment(self, horiz, vert)
  SetColLabelSize(self, height)
  SetColLabelTextOrientation(self, textOrientation)
  SetColLabelValue(*args, **kwargs)
SetColLabelValue(self, int col, String ??)
  SetColMinimalAcceptableWidth(self, width)
  SetColMinimalWidth(self, col, width)
  SetColSize(self, col, width)
  SetDefaultCellAlignment(self, horiz, vert)
  SetDefaultCellBackgroundColour(*args, **kwargs)
SetDefaultCellBackgroundColour(self, Colour ??)
  SetDefaultCellFont(*args, **kwargs)
SetDefaultCellFont(self, Font ??)
  SetDefaultCellOverflow(self, allow)
  SetDefaultCellTextColour(*args, **kwargs)
SetDefaultCellTextColour(self, Colour ??)
  SetDefaultColSize(self, width, resizeExistingCols)
  SetDefaultEditor(self, editor)
  SetDefaultRenderer(self, renderer)
  SetDefaultRowSize(self, height, resizeExistingRows)
  SetGridCursor(self, row, col)
  SetGridLineColour(*args, **kwargs)
SetGridLineColour(self, Colour ??)
  SetLabelBackgroundColour(*args, **kwargs)
SetLabelBackgroundColour(self, Colour ??)
  SetLabelFont(*args, **kwargs)
SetLabelFont(self, Font ??)
  SetLabelTextColour(*args, **kwargs)
SetLabelTextColour(self, Colour ??)
  SetMargins(self, extraWidth, extraHeight)
  SetReadOnly(self, row, col, isReadOnly)
  SetRowAttr(self, row, attr)
  SetRowLabelAlignment(self, horiz, vert)
  SetRowLabelSize(self, width)
  SetRowLabelValue(*args, **kwargs)
SetRowLabelValue(self, int row, String ??)
  SetRowMinimalAcceptableHeight(self, width)
  SetRowMinimalHeight(self, row, width)
  SetRowSize(self, row, height)
  SetScrollLineX(self, x)
  SetScrollLineY(self, y)
  SetSelectionBackground(self, c)
  SetSelectionForeground(self, c)
  SetSelectionMode(self, selmode)
bool SetTable(self, table, takeOwnership, selmode)
  ShowCellEditControl(self)
int XToCol(self, x)
int XToEdgeOfCol(self, x)
GridCellCoords XYToCell(self, x, y)
int YToEdgeOfRow(self, y)
int YToRow(self, y)

Class Variable Summary
int SelectCells = 0                                                                     
int SelectColumns = 2                                                                     
int SelectRows = 1                                                                     
int wxGridSelectCells = 0                                                                     
int wxGridSelectColumns = 2                                                                     
int wxGridSelectRows = 1                                                                     

Instance Method Details

__init__(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=WANTS_CHARS, name=PanelNameStr)
(Constructor)

Construct and show a generic Window.
Parameters:
parent
           (type=Window)
id
           (type=int)
pos
           (type=Point)
size
           (type=Size)
style
           (type=long)
name
           (type=String)
Returns:
Window
Overrides:
wx.ScrolledWindow.__init__ (inherited documentation)

Create(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=WANTS_CHARS, name=PanelNameStr)

Create the GUI part of the Window for 2-phase creation mode.
Parameters:
parent
           (type=Window)
id
           (type=int)
pos
           (type=Point)
size
           (type=Size)
style
           (type=long)
name
           (type=String)
Returns:
bool
Overrides:
wx.ScrolledWindow.Create (inherited documentation)

DrawTextRectangle(*args, **kwargs)

DrawTextRectangle(self, DC dc, String ??, Rect ??, int horizontalAlignment=LEFT,
int verticalAlignment=TOP, int textOrientation=HORIZONTAL)

ProcessTableMessage(*args, **kwargs)

ProcessTableMessage(self, GridTableMessage ??) -> bool

SetCellBackgroundColour(*args, **kwargs)

SetCellBackgroundColour(self, int row, int col, Colour ??)

SetCellFont(*args, **kwargs)

SetCellFont(self, int row, int col, Font ??)

SetCellHighlightColour(*args, **kwargs)

SetCellHighlightColour(self, Colour ??)

SetCellTextColour(*args, **kwargs)

SetCellTextColour(self, int row, int col, Colour ??)

SetColLabelValue(*args, **kwargs)

SetColLabelValue(self, int col, String ??)

SetDefaultCellBackgroundColour(*args, **kwargs)

SetDefaultCellBackgroundColour(self, Colour ??)

SetDefaultCellFont(*args, **kwargs)

SetDefaultCellFont(self, Font ??)

SetDefaultCellTextColour(*args, **kwargs)

SetDefaultCellTextColour(self, Colour ??)

SetGridLineColour(*args, **kwargs)

SetGridLineColour(self, Colour ??)

SetLabelBackgroundColour(*args, **kwargs)

SetLabelBackgroundColour(self, Colour ??)

SetLabelFont(*args, **kwargs)

SetLabelFont(self, Font ??)

SetLabelTextColour(*args, **kwargs)

SetLabelTextColour(self, Colour ??)

SetRowLabelValue(*args, **kwargs)

SetRowLabelValue(self, int row, String ??)

Static Method Details

GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)

Get the default attributes for this class. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the user's system, especially if it uses themes.

The variant parameter is only relevant under Mac currently and is ignore under other platforms. Under Mac, it will change the size of the returned font. See wx.Window.SetWindowVariant for more about this.

Parameters:
variant
           (type=int)
Returns:
VisualAttributes

Class Variable Details

SelectCells

Type:
int
Value:
0                                                                     

SelectColumns

Type:
int
Value:
2                                                                     

SelectRows

Type:
int
Value:
1                                                                     

wxGridSelectCells

Type:
int
Value:
0                                                                     

wxGridSelectColumns

Type:
int
Value:
2                                                                     

wxGridSelectRows

Type:
int
Value:
1                                                                     

Generated by Epydoc 2.1.20040428.rpd on Tue Apr 26 14:25:48 2005 http://epydoc.sf.net