25 Apr 2008 11:21 PM #1
How to add Label or HTML to FormPanel?
There doesn't seem to be a way to add a simple instructional Label or HTML to the FormPanel?? What is the best way to add some text that explains what this form is about?
29 Apr 2008 2:28 AM #2
bump.... anybody/Darrell got any thoughts about this?
29 Apr 2008 3:23 AM #3
If you just need one instructional label you can always use the title text.... FormPanel.setTitle() ?
Until now FormPanel can only host widgets that are subclasses of Field, which supports validation among other things. Although static elements like labels have no relevance in validation and posting of formdata I don't see why it shouldn't be possible to decorate our forms with such widgets.
29 Apr 2008 3:59 AM #4
setTitle seems to only set the tooltip text - perhaps you mean setHeading which is new for GXT 1.0 and sets what I would have called the container's title... I guess Darrell decided setHeading was more correct? don't know why he left setTitle in - change the name to setTooltip !!
Either way, not really what I need... perhaps I should extend Field - but before I do, is this something that Beta3 (or more) may eventually have?
29 Apr 2008 8:20 AM #5
oops, sorry. You must use FormPanel.setHeading()
29 Apr 2008 9:49 AM #6
I came across something called StaticField in the forums a while ago that can do what you are looking for.
11 Jun 2008 1:43 AM #7
Right now, the FormPanel only supports widgets that derivate from Field. Thus, LabelField does the job.
@Darrell: can you close this thread, plz?
11 Jun 2008 8:22 PM #8setTitle seems to only set the tooltip text - perhaps you mean setHeading which is new for GXT 1.0 and sets what I would have called the container's title... I guess Darrell decided setHeading was more correct? don't know why he left setTitle in - change the name to setTooltip !!
13 Jun 2008 5:05 PM #9
best solution I've found is to put FormPanel into another container and set rowlayout vertical and add HTML to the top
14 Jun 2008 12:40 AM #10
It would be really helpful to get a little bit more flexible FormPanel.
It is normally to need more than the FormPanel provides.
From my point of view it would be a good idea to provide a way to put components like labels, images and so on to a FormPanel.