I've quite large grid : 400*200,
but scrolling and refreshing is realy fast, ...
except, when I change the cells to readonly
(because I want to have a menu selection, through a popup)
for Col in range ( self.table.GetNumberCols () ) :
for Row in range ( self.table.GetNumberRows () ) :
self.SetReadOnly ( Row, Col )
Is this a known phenomena ?
'2.8.11.0 (msw-unicode)'
For the moment,
I solved the problem by making a descendant of Grid,
adding a readonly flag
and then capture the
onEditorCreated / onEditorShown / onEditorChange events.
The slowness is probably because it is creating a new cell attribute object for each cell, assigning it to the cell and then setting the read-only attribute of the attr object. You can make it more efficient by creating the cell attr object yourself, and assign it to each column (calling attr.IncRef for each one).
Or if your grid is using a custom table object then you can implement GetAttr in your table class and return an attribute from there that has the read-only value set.
···
On 5/12/11 10:39 AM, Stef Mientki wrote:
hello,
I've quite large grid : 400*200,
but scrolling and refreshing is realy fast, ...
except, when I change the cells to readonly
(because I want to have a menu selection, through a popup)
for Col in range ( self.table.GetNumberCols () ) :
for Row in range ( self.table.GetNumberRows () ) :
self.SetReadOnly ( Row, Col )
Is this a known phenomena ?
'2.8.11.0 (msw-unicode)'