Re: [gtk-list] Perl-Gtk basic problems



Luis Felipe Piccolini Marull wrote:
> 
[...]
> here is my sub and I just need to know how make a sub to put a list (text)
> in a CList called {'list_1_lista_amigos'} . 
Hi, when I replied to your private email, I told you how to append items
to a List which is what you asked. A CList is not the same widget and has
different methods.

I repeat my advice to look at the reference documentation built when you
ran perl Makefile.PL for Gtk-Perl. If you want to convert it to HTML do:
  cd $DIST_DIR/build
  pod2html perl-gtk-ref.pod>perl-gtk-ref.html

and then look at it with your browser. All the available widgets are
defined with their methods and you will see for Gtk::CList the method is

  append (self, text, ...) 
      Gtk::CList self 
      SV * text 

  Return type: integer 

so to append a row with 3 columns you would call:
  $form->->{'list_1_lista_amigos'}->append('hola', 'col2', 'col3');

HTH, Dermot



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