There are some things that are insanely difficult to search for
because the relevant keywords are abundantly more common in a
different context (in this case "class")
I just wasted a huge pile of time trying to figure out how to set the
class of an old-style (non-tosca) widget. Google is not my friend
tonight. This message is a feeble effort to help anyone that happens
to be hunting for the same info in the future.
The answer:
css_classes=['yourClass'], options=[], attrs={}, validator= etc..
Yes, I tried attrs={"class": "yourClass"} but I'm building the widget
inside a KID template and nested ${yourwidget(blah=blarg,
attrs={}).display()} shatters. Yes I also tried
attrs=dict(class="yourClass") which also gives no love.
the keywords I tried (for the aforementioned feeble effort)
searching for "turbogears widgets id class", "SingleSelectField id
class", "SingleSelectField css class", 'turbogears cssclass' '"import
widgets" id'
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.
Actually I blame html/css for the namespace collision. Sorry for the
rant, for various reasons this is both very rarely needed and silly
tricky to find.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---