simplelist column width
- From: Dave M <dave nerd gmail com>
- To: gtk-perl-list gnome org
- Subject: simplelist column width
- Date: Wed, 25 May 2005 06:29:19 -0500
Hello,
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_shadow_type('etched_in');
$scrolled_win->set_policy( 'automatic', 'automatic' );
$main_vbox->pack_start( $scrolled_win, TRUE, TRUE, 0 );
my $slist = create_list();
$scrolled_win->add($slist);
$slist->get_selection->set_mode('single');
$slist->set_rules_hint(TRUE);
$slist->set_reorderable(FALSE);
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]