wxGo
wxGo copied to clipboard
wx.Grid – accessing selection
I've created a wx.Grid and want to retrieve a user-defined selection of cells using GetSelectionBlockBottomRight and GetSelectionBlockTopLeft. The type (from my understanding) is a wx.WxGridCellCoordsArray but I cannot figure out how to access the values.
With wxPython, a tuple is returned containing 2 integers, row and column, and I would just index these. If I try to index a returned value in Go, I get an error: ("type *wx.WxGridCellCoordsArray does not support indexing"). Using GetSelectedRows or GetSelectedCols works fine.
What have I missed and how would I access the values? I'm sure the solution is obvious but I only started Go a few weeks ago so I'm still learning.
There's another function, GetSelectedCells which returns an array of selected cells. Would this be different?
Oops, it seems that the wxGridCellCoordsArray isn't correctly wrapped
Ah, that explains it.
Is this likely to be in the next release? I've like to help if I could but I'm not an expert.
Yes, I'm fixing it.
Looking at using grid.... just checking in, did this issue get resolved? Thanks!
As far as I know, no. I've upgraded to the latest wxGo but still don't find selection issues resolved.