simplelist column width


Is there a way to set the max width of the columns in SimpleList and
still allow the user to resize each column manually? I don't want each
column to be able to scroll beyond $x unless the user does it.
Currently I have a SimpleList inside of a ScrolledWindow. Possibly
relevant code:

my $scrolled_win = Gtk2::ScrolledWindow->new;
$scrolled_win->set_policy( 'automatic', 'automatic' );
$main_vbox->pack_start( $scrolled_win, TRUE, TRUE, 0 );

my $slist = create_list();

map { $_->set_resizable(TRUE) } $slist->get_columns;
$slist->signal_connect( row_activated => \&row_clicked );

sub create_list {
    my $list = Gtk2::SimpleList->new(
        'File'   => 'text',
        'Type'   => 'text',
        'Size'   => 'text',
        'Status' => 'text',

    return $list;

I've seen this done in other Gtk/Gtk2 apps, but I still can't figure
out how to do it.

Thanks in advance.

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