Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I disable resizable rows in a wxPython Grid?

I'm using a wx.grid.Grid in my application. Its never going to be useful to resize the rows of the grid, so I would love to disable the ability to resize them. Is this possible, and how would I go about doing it?

Justification

When testing the application I keep accidentally clicking the surprisingly large border between cells when I'm trying to click the cell body. The rows can't be much more than 20px tall, and the clickable (draggable) border is at least 3px across. In addition to the fact that I often accidentally rescale a row when I intended to select multiple cells, I really think it's worth disabling resizing. An acceptable alternative would be to disable dragging of the borders between the cells entirely, but still enable resizing of rows and columns by the border between the labels along the top and left edge.

like image 840
Hubro Avatar asked Nov 18 '25 12:11

Hubro


1 Answers

DisableDragRowSize() is what you need.

like image 155
Sam Mussmann Avatar answered Nov 20 '25 02:11

Sam Mussmann