>Comment out the SetSelectionMode and SetRowLabelSize calls and you'll
>see that the GetSelectedCells and GetSelectedRows will return values if
>you click or drag on the labels.
So SetSelectionMode breaks the reporting functions; a bug yes?
The LabelSize functions have no negative effect on the GetSelection
functions. Why did you wish them commented out? Is it that
GetSelectedRows() will only return the rows that are selected by
clicking on the row label?
>GetSelectedCells returns a list of cells that are selected individually,
>usually by Ctrl-Clicking on individual cells.
>
>For one or more blocks of selected cells selected with click-drag or
>Ctrl-click-drag on the cells we have GetSelectionBlockTopLeft and
>GetSelectionBlockBottomRight.
>
>It's possible to have a combination of selection types selected at the
>same time when using the Ctrl key and the various clicking and dragging
>methods, and the various Get methods will show that. For example:
>
>OnGridCellRightClick --------------------
>Cells: [(6, 0), (8, 0)]
>Rows: [2]
>Cols: [2]
>TopLeft: [(10, 0), (14, 0)]
>BotRt: [(11, 1), (16, 0)]
Good grief this means I have to merge all the answers from *all* the selection
functions! At a minimum the docs need to point out all the conditions that cause
these functions to return anything. Having a function that did all this house
keeping inside of the Grid Ctrl would be a nice improvement.
>Robin wrote:
>Comment out the SetSelectionMode and SetRowLabelSize calls and you'll
>see that the GetSelectedCells and GetSelectedRows will return values if
>you click or drag on the labels.
So SetSelectionMode breaks the reporting functions; a bug yes?
It could be, but there may be some rational for it that I don't know about.
The LabelSize functions have no negative effect on the GetSelection
functions. Why did you wish them commented out? Is it that
GetSelectedRows() will only return the rows that are selected by
clicking on the row label?
Yes.
>GetSelectedCells returns a list of cells that are selected individually,
>usually by Ctrl-Clicking on individual cells.
>
>For one or more blocks of selected cells selected with click-drag or
>Ctrl-click-drag on the cells we have GetSelectionBlockTopLeft and
>GetSelectionBlockBottomRight.
>
>It's possible to have a combination of selection types selected at the
>same time when using the Ctrl key and the various clicking and dragging
>methods, and the various Get methods will show that. For example:
>
>OnGridCellRightClick --------------------
>Cells: [(6, 0), (8, 0)]
>Rows: [2]
>Cols: [2]
>TopLeft: [(10, 0), (14, 0)]
>BotRt: [(11, 1), (16, 0)]
Good grief this means I have to merge all the answers from *all* the selection
functions! At a minimum the docs need to point out all the conditions that cause
these functions to return anything. Having a function that did all this house
keeping inside of the Grid Ctrl would be a nice improvement.
Yep.
ยทยทยท
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!