Button in grid

Good day,

I want to show command button next to cell in grid. For example to show some details about cell value.

I use command:
self.button = wx.Button(self.grid, -1, “F3”, pos = (buttonX, buttonY), size = (20,20))

It seems to me that self.button is drawn beyond grid and therefore is not visible. How can I bring the button to front of self.grid?

Thanks,
Aigars

Aigars wrote:

Good day,

I want to show command button next to cell in grid. For example to show some details about cell value.

I use command:
self.button = wx.Button(self.grid, -1, "F3", pos = (buttonX, buttonY), size = (20,20))

It seems to me that self.button is drawn beyond grid and therefore is not visible. How can I bring the button to front of self.grid?

The grid widget is composed of a few other windows, so if you want to put some other control on the grid in the area where the cells are located you need to use that component window as the parent of the control. You can get that window with grid.GetGridWindow()

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!