[wxPython-users] a few questions about wx.Grid
Vern Muhr
VernM at berkeleyprocess.com
Tue Feb 13 16:46:25 PST 2007
Chris,
Thanks for the very quick reply! SetCellHighlightPenWidth(0) eliminated the cursor, as long as it is called after the grid has been populated. I don't really understand what the real prequisite is, but I get an exception if I set it too soon.
I was also able to hide a column if:
1. I call SetColMinimalAcceptableWidth(col, 0)
2. I later call SetColSize(col,0)
3. finally, renderer.GetBestSize() returns a with of 0 for cells in the hidden column.
Thanks again for the help,
Vern
-----Original Message-----
From: Chris Mellon [mailto:arkanes at gmail.com]
Sent: Tuesday, February 13, 2007 1:30 PM
To: wxPython-users at lists.wxwidgets.org
Subject: Re: [wxPython-users] a few questions about wx.Grid
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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
More information about the wxpython-users
mailing list