[Gtk-sharp-list] Getting the coordinates of a cell in a TreeCellDataFunc method.
tapia
tapia@eitig.com
Tue, 17 Aug 2004 11:01:55 +0200
--=-Tqe0kdyelZqY6kKLG0Q1
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Hi.
First of all, sorry for my english :-)
I have a dinamically created TreeView. So I don't know how much columns
it have. The problem is when I have to populate it. I can't know how to
get the column I'm drawing.
I have something like this, in the TreeView constructor:
column.SetCellDataFunc (tr, new TreeCellDataFunc (GenericCellDataFunc));
And the GenericCellDataFunc method:
private void GenericCellDataFunc(TreeViewColumn col,
CellRenderer cell,
TreeModel model,
TreeIter iter)
{
Item item =3D (Item)model.GetValue(iter, 0);
=09
if (item !=3D null) {
((CellRendererText)cell).Text =3D item.Columns[***WHAT COLUMN?
***].ToString();
}
}
As you can see, I need to know in what column I'm working. How could I
get this?
Thank you very much.
C.
--=-Tqe0kdyelZqY6kKLG0Q1
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
digitalmente
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQBBIcmCUB+wbKFFlkARAiKmAJ9gjmUCqGTE2UL1ixCp1au8LzXWDgCeMKyH
mcRTsXFUriFEaAbsNd5Zcxs=
=aKin
-----END PGP SIGNATURE-----
--=-Tqe0kdyelZqY6kKLG0Q1--