Monday, 15 July 2013

python - Replace item in wxPython GridSizer -



python - Replace item in wxPython GridSizer -

i have wx.frame wx.gridsizer. grid contains several custom wx.panel. need swap content of 2 cells of grid. tried several solutions using detach, getitem, , insert methods without success.

for illustration suppose have 3x3 grid 8 elements (my custom panels) 0 7. in case lastly cell of grid empty. want move lastly item (grid[7]) in lastly cell (grid[8]).

how can do? , differences if lastly last cell not empty?

'panelingrid7' in next instance of panel in grid[7], in gridbagsizer positions in (2, 1)

sizer.detach(panelingrid7) sizer.add(panelingrid7, (2,3))

if (2, 3) not empty need detach item , add together want it.

python wxpython sizer

No comments:

Post a Comment