[wxPython-users] a few questions about wx.Grid

Chris Mellon arkanes at gmail.com
Tue Feb 13 13:29:45 PST 2007


On 2/13/07, Vern Muhr <VernM at berkeleyprocess.com> wrote:
>
>
>
> Greetings,
>
> I am using a custom renderer to create a read-only grid with a tree
> structure drawn in the first column. Since my grid is read-only, I don't
> want a cursor. Is there a way to 'hide' the cursor so it is never drawn?
>

SetCellHighlightPenWidth(0). Note that the cursor will still be
"present" and that may affect the way your user interacts with the
grid unless you provide overridden behavior. For example, arrow keys
to navigate may not be intuitive (since they'll be moving the
invisible cursor, not scrolling the grid).

> My other question involves rows/columns that I want to be hidden. Something
> like, rows with 0 height, or columns with 0 width. Is there a way to prevent
> a row or column from being visible?
>

Set them to 0 height/width.

> The custom renderer example and the custom tree example have been very
> helpful in getting my "treeGrid" to work. I would be happy to submit it as
> an example, when it is a bit more polished.
>

Congratulations, I look forward to seeing it.

> Regards, Vern Muhr
>




More information about the wxpython-users mailing list