Re: newbie question
- From: muppet <scott asofyet org>
- To: Bruno Tavares <bat ip pt>
- Cc: gtk-perl-list gnome org
- Subject: Re: newbie question
- Date: Wed, 20 Aug 2003 13:04:37 -0400
On Wednesday, August 20, 2003, at 11:01 AM, Bruno Tavares wrote:
Having a Gtk2::TreeView and a Gtk2::TreeViewColumn that is append to
that tree view, how do i get the position of the column?
$new_n_cols = $treeview->append_column ($column);
$index_of_new_col = $new_n_cols - 1;
you can also go brute force:
$column = the column i want to know about;
@columns = $treeview->get_columns;
for ($index = 0 ; $index < @columns ; $index++) {
last if $column == $columns[$index];
}
if ($index < @columns) {
do something with your new knowledge
} else {
$column isn't in the treeview!
}
possibly some grep magic would take away the pain and ugliness of that
very C-like idiom.
i'm so used to vi i tried several times to hit escape, o, i, D, and J
while writing this message in Mail.App.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]