1
python 2.7私はwx.grid
テーブルを持っています。垂直スクロールを行うにはどうしたらいいですか?自動スクロールwx.gridテーブルを作成するには?
私が試した:
MakeCellVisible(rows,cols)
と
SetGridCursor(rows, cols)
を彼らは動作しませんでした。
python 2.7私はwx.grid
テーブルを持っています。垂直スクロールを行うにはどうしたらいいですか?自動スクロールwx.gridテーブルを作成するには?
私が試した:
MakeCellVisible(rows,cols)
と
SetGridCursor(rows, cols)
を彼らは動作しませんでした。
用途:
grid_widget.Scroll(row, column)
編集:で生産された
:
import wx
import wx.grid as grid
#
class Button(wx.Frame):
def __init__(self, parent, source):
wx.Frame.__init__(self, parent, -1, size=(100,100))
self.source = source
self.pos = 0
self.button = wx.Button(self, label='0')
self.Bind(wx.EVT_BUTTON, self.onbutton, self.button)
self.Show()
def onbutton(self, evt):
self.pos += 1
self.source.grid.Scroll(self.pos, self.pos)
self.button.SetLabel(str(self.pos))
class Frame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent, -1, "Grid", size=(350,250))
self.grid = grid.Grid(self)
self.grid.CreateGrid(20, 20)
self.but = Button(None, self)
if __name__ == '__main__':
app = wx.PySimpleApp()
frame = Frame(None)
frame.Show()
app.MainLoop()
が、私は同じことを持っていたここでは、作業例を持っていますprobl em。ちょうどグリッド機能を使用しようとするMakeCellVisible(行、列)
それは動作しませんでした。効果なし – user1000571
@ user1000571編集をご覧ください – joaquin