PDA

View Full Version : Styling form labels



gochem
13 Sep 2007, 4:30 AM
Hi all, I am experimenting with Ext and new to this Forum.

My question is about Form (Text)Fields in general.
Is there a way to add a style to the label of a field when its required?
I would like to have the label coloured red...

Thanks in advance!

fay
13 Sep 2007, 6:13 AM
form.add(new Ext.form.TextField({
fieldLabel: 'First Name',
name: 'first',
labelStyle: 'color: red;',
width:175,
allowBlank:false
}));

gochem
13 Sep 2007, 7:04 AM
Thanks Fay!

super_drone
5 Oct 2007, 11:31 AM
Thanks guys. Although this works, I don't find any mention of labelStyle anywhere in the API docs. Is it undocumented or I just don't see it?

Thanks

tryanDLS
5 Oct 2007, 1:50 PM
It's already added to doc bugs thread and looks to be fixed in SVN.