Just to broaden your toolkit horizons, Gtk2 will do it.
#!/usr/bin/perl use warnings; use strict; use Glib qw/TRUE FALSE/; use Gtk2 -init; use Gtk2::Ex::Simple::List; my $win = Gtk2::Window->new; $win->set_title ('Gtk2::Ex::Simple::List exapmle'); $win->set_border_width (6); $win->set_default_size (500, 300); $win->signal_connect (delete_event => sub { Gtk2->main_quit; }); my $hbox = Gtk2::HBox->new (0, 6); $win->add ($hbox); my $scwin = Gtk2::ScrolledWindow->new; $hbox->pack_start ($scwin, 1, 1, 0); $scwin->set_policy (qw/automatic automatic/); my $slist = Gtk2::Ex::Simple::List->new ( 'Text Field' => 'text', 'Bool Field1' => 'bool', 'Bool Field2' => 'bool', 'Bool Field3' => 'bool', ); @{$slist->{data}} = ( [ '1text', TRUE, TRUE, TRUE ], [ '2text', TRUE, FALSE, TRUE ], ); # (almost) anything you can do to an array you can do to # $slist->{data} which is an array reference tied to the list model push @{$slist->{data}}, [ '9text', FALSE, FALSE, TRUE ]; # mess with selections $slist->get_selection->set_mode ('multiple'); $slist->get_selection->unselect_all; $slist->select (1, 3, 5..9); # select rows by index $slist->unselect (3, 8); # unselect rows by index my @sel = $slist->get_selected_indices; # simple way to make text columns editable my $col_num = 0; $slist->set_column_editable ($col_num, TRUE); # Allow sorting on the column #$slist->get_model->set_sort_column_id(0); #Gtk2::TreeSortable::set_sort_column_id($slist, 0, undef); $scwin->add ($slist); my $vbox = Gtk2::VBox->new (0, 6); $hbox->pack_start($vbox, 0, 1, 0); # finally, a button to end it all my $btn = Gtk2::Button->new_from_stock ('gtk-quit'); $btn->signal_connect (clicked => sub { Gtk2->main_quit; }); $vbox->pack_end($btn, 0, 1, 0); $win->show_all; Gtk2->main;

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

In reply to Re: Insert checkbutton into MListbox by zentara
in thread Insert checkbutton into MListbox by ghosh123

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.