Re: Gtk2::Liststore multiple columns



I want to create a list with multiple columns. Therefore I use the script added below (actually there are 8 columns, but I reduced them to make it less complicated). The subroutine &abfrage_all returns an array  with references to arrays. Each referred array is a row in a database. I now want to put each row from the database into my list. But what  I get is that in each column of one row the value of the first column is put (i.e. $zeile[0] in columns 1 to 8):

new_with_attributes($Beschriftung[$i],Gtk2::CellRendererText->new, text => 0);

i think this should read:

  new_with_attributes($Beschriftung[$i],Gtk2::CellRendererText->new, text => $i);

so that the column is bound to the appropriate model column.

if your requirements of this list are not too complex, take a look at Gtk2::Simplelist...

regards, bostjan 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]