Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wx.Grid – accessing selection #43

Open
salmoni opened this issue Jan 26, 2018 · 5 comments
Open

wx.Grid – accessing selection #43

salmoni opened this issue Jan 26, 2018 · 5 comments

Comments

@salmoni
Copy link

salmoni commented Jan 26, 2018

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?

@dontpanic92
Copy link
Owner

Oops, it seems that the wxGridCellCoordsArray isn't correctly wrapped

@salmoni
Copy link
Author

salmoni commented Jan 26, 2018

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.

@dontpanic92
Copy link
Owner

Yes, I'm fixing it.

@glycerine
Copy link

Looking at using grid.... just checking in, did this issue get resolved? Thanks!

@salmoni
Copy link
Author

salmoni commented Jul 29, 2018

As far as I know, no. I've upgraded to the latest wxGo but still don't find selection issues resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants