> -----Original Message-----
> From: Ananda Regmi [mailto:aregmi gmail.com]
> Sent: Wednesday, June 27, 2007 5:32 PM
> To: wxPython-users lists.wxwidgets.org
> Subject: Enable/Disable editing on a cell in wx.grid.
>
> Greeting,
>
> Is there a way to enable/disable editing of the row/col
of
> the grid. For some reasong using attribute doesn't work
for
> me. I tried the following in my attempt to make some
cols readonly.
>
> attr = wx.grid.GridCellAttr()
> attr.SetReadOnly(False)
> for col in range(noOfCols):
> if col in ReadOnlyCols:
> for row in range(noOfRows):
> self.grid.SetAttr(col,row,attr)
>
> Any suggestions.
>
> Appreciate your help.
>
> Ananda
>
In my grid class, I just do the following:
self.SetReadOnly(0,0,True) # sets the first column to read
only
self.SetReadOnly(0,1,True) # sets the second column to read
only
self.SetReadOnly(7,0,True) # sets the 7th row to read
only.
Hope that helps.
Mike
------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribe lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help lists.wxwidgets.org
|