wxgrid

Changing Size of Grid when grid data is changed

旧巷老猫 提交于 2019-12-24 11:46:35
问题 I'm having trouble updating a wx grid after it's initially created in Python. I'm following the steps located here: http://wiki.wxpython.org/wxGrid but for some reason the grid is not being displayed correctly. The rows keep on being added and added, despite if the data grows or shrinks. Here is the code. Clicking the refresh button re-initializes the data that the grid is supposed to display. The bug (I think) is in the function refreshGrid, but I can't figure out what is causing it! import

How do I control the viewport of a Grid in wxPython?

我们两清 提交于 2019-12-11 18:19:59
问题 I'm trying to implement Find functionality in my grid application. I can move the cursor using SetGridCursor(self, row, col) , but I can't figure out how to move the "viewport" of the grid to the new cursor position. In other words, when the cursor is moved to the cell the user is looking for, the user still has to manually scroll around until he finds the cursor cell. How do I programmatically scroll the grid so I can centre the grid cursor in the viewport? By random, while writing this