durusmail: quixote-users: some newbie questions and comments
some newbie questions and comments
2003-11-20
2003-11-20
2003-11-20
2003-11-20
2003-11-21
2003-11-21
2003-11-23
2003-11-23
2003-11-22
2003-11-22
2003-11-23
2003-11-23
2003-11-22
some newbie questions and comments
Nicola Larosa
2003-11-21
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>> You already can, just pass a keyword parameter (css_class = "aStyle") to
>> the widget constructor.

> Not true in form2,

I rechecked the code and you're right, the constructor's got nothing to do
with CSS rendering. By the way, it seems there's no significant difference
between form and form2 in this regard.


> and I believe was only true for TextWidget in the original form
> implementation.

It's the StringWidget, the only one whose "render" method's got a
"**attributes" parameter that is in turn passed to the "htmltag" call, where
the magic happens. ;^)


> I'm sure that's just an oversight.
>
> It would be extremely useful to be able to pass CSS "class"
> attributes/values, as well as "id" atts/vals to any form object, including
> and especially the form itself.

I definitely agree, can't see any reason why *all* widgets can't have the
same arrangement as the StringWidget one.


> I was going to suggest doing the same for WidgetRow object too, but I just
> realized I can accomplish what I was thinking of doing through simple
> subclasses of WidgetRow and Form.

One of the beauties of open source is that it allows more customizing than
simple subclassing, if needed. :^)


> An example use case -- setting a different CSS "class" value for a form
> row with an error condition.

Exactly, I prefer a yellow background to get the user's attention to using
the vision-impaired-unfriendly red color for the text of errors.


- --
"Learning when to violate a process, when to step outside it or somehow
transform it in order to serve a higher value demands what is highest
in *us*." -- Steve Talbott, NetFuture

Nicola Larosa - nico@tekNico.net


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/vdNwXv0hgDImBm4RAo+JAKC6urJuBdAa4wZ5f/CUiLr59EPyAQCcDFvg
P/u90KgRu+nOUHjer9nxyuw=
=HUSV
-----END PGP SIGNATURE-----



reply