Hi people
I just discovered this (wonderful) group .
It's some time that I use TG2, but since now haven't no need of the
the powerfull Tosca Widgets, adnd so I haven't looked for as need.
Now I recognize that they can simplify my job of several orders of
magnitude. But the sample on the TG2 docs are reaaly simple, poor and
oreinted to the paradigm: take data from orm and display'em on a
screen Insert/Update form.
My problem is that I need to define a generic template (same as those
that I've seemed on the ToscaWidgets site itself) with a correlated
controller.
I try to make clearly with a sample. On the TG2 site's doc I can foun
from tw.api import WidgetsList
from tw.forms import TableForm, CalendarDatePicker, SingleSelectField,
TextField, TextArea
class MovieForm(TableForm):
class fields(WidgetsList):
title = TextField()
...
Now, if i want use a widget ImageButton
>>> from tw import forms
>>> help(forms.fields.ImageButton)
Help on class ImageButton in module tw.forms.fields:
class ImageButton(Button)
| Method resolution order:
| ImageButton
| Button
| InputField
...
how should I declare in the MovieForm class above?
Can be correct write something like:
from tw.api import WidgetsList
from tw.forms import TableForm, CalendarDatePicker, SingleSelectField,
TextField, TextArea, ImageButton
class QSearchForm( TableForm ):
class fields( WidgetsList ):
search_string = TextField()
search_button = ImageButton()
...
Other question: how can I say what image to use? I.E tg.url+"/images/
info.png" ?
Thank's a lot for the help, I hope to be my turn to help
Greetings
JOKER Ltd.
--
You received this message because you are subscribed to the Google Groups
"TurboGears" 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?hl=en.