Kane schrieb:
> I just wasted a huge pile of time trying to figure out how to set the
> class of an old-style (non-tosca) widget.

> css_classes=['yourClass'], options=[], attrs={}, validator= etc..

The answer to what problem exactly is this? Can you give a bit more context?

> Yes, I tried attrs={"class": "yourClass"} but I'm building the widget
> inside a KID template and nested ${yourwidget(blah=blarg,
> attrs={}).display()} shatters.

That seems not a very common approach to me and (though I am on thin ice
here, without seeing more of you code) a violation of the MVC principle.
I would always define widgets in pure Python modules and pass them in
the controller or, if you must, import them in the template.

> Yes I also tried
> attrs=dict(class="yourClass") which also gives no love.

Yes, because "class" is a Python reserved keyword.

> reading the widgets documentation on turbogears.org gave me no love,
> after finding the answer and doing a search "css_classes" is used but
> not explained in just one place (not that it needs more than an
> example) on the "Nicer Forms" RoughDocs.

Can you please do as a favor an point us to the place where this used,
so we can add an explanation and example (can you provide one, maybe)?

Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to