[pygtk] retrieving TreeView markup
Michael Urman
murman at gmail.com
Thu Jul 19 11:37:02 WST 2007
On 7/18/07, Renee Yang <reneey at gmail.com> wrote:
> The only option I could think of was to mimic the original rendering
> of the TreeView and accumulate the markup as it's being rendered. I
> might as well gather the markup the first time the TreeView is
> rendered, but that would also mean doing extra work for an export
> option that probably won't be used 99% of the time. While this could
> work, I'm wondering if there's a simpler solution I'm just not seeing.
> Has anyone dealt with this before? Any help very much appreciated.
While implementing my first version of inplace tips for the treeview,
I ran into the same limitation, The workaround I went with was
assigning to a (python) attribute on the cellrenderer: renderer.markup
= markup. Then when reading it (which was guaranteed to be for the one
cell in question), I would attempt to read the attribute off the
renderer. It required some explicit cooperation, but it's scads easier
(and probably better) than reimplementing the treeview from scratch.
--
Michael Urman
More information about the pygtk
mailing list