wx.grid.SetMargins()

The method wx.grid.SetMargins() seem, in the documentation, to be quite trivial, you have only to state width (I imagine in pixels) and height. But nothing seems to happen. There’s a problem with my OS (Windows XP Home) or what else?

Touché. In fact I looked for a method to leave a white margin (like one or more white spaces) on the left and right of the text, as in Visual C++ CEdit control. To get this result, I gather it will be necessary to subclass an editor and a renderer in order to just show some dummy spaces. Thanks for the attention.

···

2008/2/19, Robin Dunn robin@alldunn.com:

Raffaello Barella wrote:

The method wx.grid.SetMargins() seem, in the documentation, to be quite
trivial, you have only to state width (I imagine in pixels) and height.
But nothing seems to happen. There’s a problem with my OS (Windows XP

Home) or what else?

It works here. What are you expecting it to do?


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


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org

For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Raffaello Barella wrote:

Touché. In fact I looked for a method to leave a white margin (like one or more white spaces) on the left and right of the text, as in Visual C++ CEdit control. To get this result, I gather it will be necessary to subclass an editor and a renderer in order to just show some dummy spaces. Thanks for the attention.

SetMargins will add the given number of pixels to the virtual size of the grid, which essentially lets you scroll past the right or bottom ends of the cells by that many pixels. If you are wanting to be able to control the margins inside of a cell editor then you will need to write a custom editor.

···

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