Dinamically change the number of columns in a grid (I am getting crazy with this)

Ok, as usually happens I solved the problem 5 minutes after sending
this email (and two days after trying to solve it! )
Just FYI,

line 56: self.data = [['']*len(self.dataTypes)
had to become: self.data =

It wasn't a problem with deletion of columns but of rows.

cheers,
Giorgio

···

On 8/29/07, Giorgio F. Gilestro <giorgio@gilestro.tk> wrote:

Hi guys,
I attach to this email a PY example of a problem I CANNOT SOLVE.

Launch the script and you'll see a customtable grid and four buttons:

One to Fill the table with 10 rows
One to append a single row to the table
One to increase by 3 the number of columns and fill the table with 10 rows
One to Restore the number of columns to starting situation and clear
the contents.

Play with just the first three buttons and everything works fine.

BUT, try pressing number four and the number one and you'll see that
for some reason the table will be one row shorter! Press again 4 - 1
and will be two row shorter. And so on.

The problem lays with the deletion of columns. Without that,
everything works great.
Please, if you have any suggestion will be most appreciated since I am
getting nuts this time

Thanks
gg