Max size for columns of a treeview
- From: Cornel Ghiban <green neomedia ro>
- To: gtk-perl-list gnome org
- Subject: Max size for columns of a treeview
- Date: Thu, 1 Jul 2004 14:06:24 +0300
Hi everybody.
I have some data(text) I have to display into a TreeView.
When data is loaded it get the window to be widened too much. Some
columns are pretty wide. Is there a way to limit this behaviour? Lets
say a column can have maximum x pixels.
I know that limitting the number of chars into a cell can be a solution
but it's not that good.
This is how data is added to the treeview:
sub _add {
my ($self, $treeview) = @_;
my $renderer;
my $idx = 0;
foreach (@columns) {
$renderer = Gtk2::CellRendererText->new;
$treeview->insert_column_with_data_func (-1, $_,
$renderer,
\&_macro_set_func_text,
$idx++);
}
#set the columns resizable
for $idx (1 .. $#columns) {
my $column = $treeview->get_column($idx);
$column->set_resizable(TRUE) if $column;
}
}
Tnx
Cornel Ghiban
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]