« Return to Thread: FXTable insert/delete row

Re: FXTable insert/delete row

by Mad Max :: Rate this Message:

Reply to Author | View in Thread

OK, I got no answers ... one of the possible reasons is that I maybe didn't explain enough ...  trying again ...

I would like to exexute this code if I delete or insert a row in a table:
for(r=0; r<nr; r++)
  {
    for(c=0; c<nc; c++)
    {
      table->setItemText(r,c,"r_ridim:"+FXStringVal(r+1)+" c_ridim:"+FXStringVal(c+1));
    }
  }

So the result should be more or less the text "r_ridim(number of row)+c_ridim(number of column)" in every cell of the table.

What I get putting this code in the insert and delete row functions (as in the example in the first message) is:
insert a row: ok every cell is filled with correct text
delete a row: every cell is filled with text but the one I deleted, i.e. if for example I delete the row number 4 then I got item "r_ridim:3 c_ridim:1" for row 3 column 1 and item "r_ridim:5 c_ridim:1" for row 4 column 1 instead of "item r_ridim:4 c_ridim:1 " ...

Hope it is more clear now.
Thanks again for your attention and eventually :-) answers ...

Regards,
Mad Max

 « Return to Thread: FXTable insert/delete row