Public Member Functions | |
void | AddSelection (Point cellCoord) |
void | Draw (DC dc, ICollection< Rectangle > updateCellRegions) |
Renderers.PresentationMode | GetPresentationMode (Point cellCoord) |
ICollection< Point > | GetSelectedCells () |
Grid (Window parent, int id, Point position, Size size, WindowStyles styles) | |
Grid (Window parent, Point position, Size size, WindowStyles styles) | |
Point | HitTest (MouseEvent evt) |
bool | IsSelected (Point cellCoord) |
Public Attributes | |
GridCellSelectionChangedEventHandler | OnSelectionChanged |
GridCellSelectionChangingEventHandler | OnSelectionChanging |
Properties | |
Pen | BorderPen [get, set] |
Pen | BorderPenFixedWidth [get, set] |
IGridModel | Data [get, set] |
CellAttr | DefaultLabelAttrs [get, set] |
CellAttr | DefaultValueCellAttrs [get, set] |
bool | HideColumnLabels [get, set] |
bool | HideRowLabels [get, set] |
bool | IsMultiselect [get, set] |
bool | LabelsAreFixed [get, set] |
bool | ReadOnly [get, set] |
Point | SelectedCell [get, set] |
GridSelectionMode | SelectionMode [get, set] |
override WindowStyles | StyleFlags [get, set] |
Point | TopLeftCellIndex [get, set] |
Classes | |
class | CellLayoutCollection |
wx.GridCtrl.Extended.Grid.Grid | ( | Window | parent, | |
Point | position, | |||
Size | size, | |||
WindowStyles | styles | |||
) |
Creates an instance.
parent | The parent control. | |
position | The position of the window. Use wxDefaultPosition if unknown. | |
size | The initial size of the window. Use wxDefaultSize if unknown. | |
styles | Styles of the control. |
Used styles:
This CTor will create a SparseGridModel.
wx.GridCtrl.Extended.Grid.Grid | ( | Window | parent, | |
int | id, | |||
Point | position, | |||
Size | size, | |||
WindowStyles | styles | |||
) |
Creates an instance.
parent | The parent control. | |
id | A numeric ID of this control. Useful for searching. | |
position | The position of the window. Use wxDefaultPosition if unknown. | |
size | The initial size of the window. Use wxDefaultSize if unknown. | |
styles | Styles of hte control. |
Used styles:
Please note, that the grid will set WindowStyles.FULL_REPAINT_ON_RESIZE
automatically. Thus, this style will have no effect if specified by the application.
This CTor will create a SparseGridModel.
void wx.GridCtrl.Extended.Grid.AddSelection | ( | Point | cellCoord | ) |
In multiselection modes, this method adds the selection that can be derived from the argument to the current selection, i.e. in multiselect row mode, this will add the row containing the cell from the argument list, in multiselect column mode, this will add the column, in multiselect cells mode, this will add the cell. The current selection will be stored. The selected cell will change to the argument.
This operation is only available in a multiselect mode.
cellCoord | The new part of the selection. |
NotSupportedException | This grid is not in a multiselection mode. |
void wx.GridCtrl.Extended.Grid.Draw | ( | DC | dc, | |
ICollection< Rectangle > | updateCellRegions | |||
) |
Draw the grid onto the provided context.
dc | The grid will be drawn on this context. | |
updateCellRegions | If not empty, describes the grid cells that shall be repainted refreshing the device context. |
Renderers.PresentationMode wx.GridCtrl.Extended.Grid.GetPresentationMode | ( | Point | cellCoord | ) |
Returns the presentation mode of the cell designated by the parameter.
cellCoord | The cell whose presentation mode is required. |
ICollection<Point> wx.GridCtrl.Extended.Grid.GetSelectedCells | ( | ) |
Returns a freshly allocated collection of selected cells (no side effects on removing or adding values).
Point wx.GridCtrl.Extended.Grid.HitTest | ( | MouseEvent | evt | ) |
Returns the coordinates of the cell that has been hit by the provided mouse event. If this position is not related to a grid cell, the result will be wxDefaultPosition
. If the Y position is -1 but the X position is larger than or equal to 0, the result represent a column label. If the X position is -1 but the Y position is larger than or equal to 0, the result is a row label.
evt | The mouse event that shall be analysed. |
bool wx.GridCtrl.Extended.Grid.IsSelected | ( | Point | cellCoord | ) |
Returns true if the cell designated by the argument is selected (either the selected cell or a cell selected additionally in row or column selection mode or in a multiselect mode.
cellCoord | The coordinates of the cell that shall be investigated. |
GridCellSelectionChangedEventHandler wx.GridCtrl.Extended.Grid.OnSelectionChanged |
This will be raised after the selection of cells in the grid has been changed (even if using the property setter).
GridCellSelectionChangingEventHandler wx.GridCtrl.Extended.Grid.OnSelectionChanging |
This will be raised before changing the selection of a cell (even if using the property setter). Handlers are allowed to cancel the operation.
Pen wx.GridCtrl.Extended.Grid.BorderPen [get, set] |
Pen that will be used to draw the border between cells.
Pen wx.GridCtrl.Extended.Grid.BorderPenFixedWidth [get, set] |
Pen that will be used to draw borderlines between fixed and scrollable columns.
IGridModel wx.GridCtrl.Extended.Grid.Data [get, set] |
The data presented by this control.
CellAttr wx.GridCtrl.Extended.Grid.DefaultLabelAttrs [get, set] |
Default attributes of label cells. These attributes MUST implement all properties. They will be used to complete missing properties in more specific attribute sets returned by the data model. Please note, that row span and column span properties will be ignored when drawing the labels.
CellAttr wx.GridCtrl.Extended.Grid.DefaultValueCellAttrs [get, set] |
Default attributes of value cells. These attributes MUST implement all properties. They will be used to complete missing properties in more specific attribute sets returned by the data model. Row span and column span will be normalized to 1 on setting this value.
bool wx.GridCtrl.Extended.Grid.HideColumnLabels [get, set] |
Get or set whether row labels are hidden. You can specify the initial value of this property with style flag WindowStyles.GRID_HIDE_COLUMN_LABELS.
bool wx.GridCtrl.Extended.Grid.HideRowLabels [get, set] |
Get or set whether row labels are hidden. You can specify the initial value of this property with style flag WindowStyles.GRID_HIDE_ROW_LABELS.
bool wx.GridCtrl.Extended.Grid.IsMultiselect [get, set] |
Get or set whether this is in multiselect mode or not. If you assign a value to this property, the SelectionMode
will change. If the previous selection mode selects individual cells, the new selection mode will also select individual cells. If the previous selection selected columns or rows, the new selection mode will also select columns or rows respectively.
Is you assign a value to this flag, the selection mode will change according to the table below. If this is false but you assign true, the value in the left column will be replaced by the value in the right column. If this is true and you assign false, the right value will be replaced by the left value.
IsMultiselect is false | IsMultiselect is true |
---|---|
GridSelectionMode.Cell | GridSelectionMode.MultiselectCells |
GridSelectionMode.Row | GridSelectionMode.MultiselectRows |
GridSelectionMode.Column | GridSelectionMode.MultiselectColumns |
bool wx.GridCtrl.Extended.Grid.LabelsAreFixed [get, set] |
Get or set a value indicating whether the row and column labels will be displayed in fixed positions if not hidden. If this is true, the user only scrolls data cells. Labels will be displayed without regarding the scroll position.
bool wx.GridCtrl.Extended.Grid.ReadOnly [get, set] |
Get or set whether this grid is for reading only. Readonly grids do not open editors.
Point wx.GridCtrl.Extended.Grid.SelectedCell [get, set] |
The currently selected cell. In all selection modes this property will have the coordinates of that cell as value, that is allowed to show up the editor if required. In row selection mode, the whole row containing this cell will be displayed as selection. In column mode, the whole column containing this cell will be displayed as selection. In multiselection mode, all previous selections will get lost.
GridSelectionMode wx.GridCtrl.Extended.Grid.SelectionMode [get, set] |
Get or set the selection mode.
override WindowStyles wx.GridCtrl.Extended.Grid.StyleFlags [get, set] |
This will set or get the styles flags that define this window.
Reimplemented from wx.Window.
Point wx.GridCtrl.Extended.Grid.TopLeftCellIndex [get, set] |
This is the index of the cell visible in the top left corner of the client size. Use this if you need to have information on the visible cells. In multiselection modes, all selections without direct reference to the selected cell will get lost.