A LabelField
is another very simple class, just slightly more complicated than a SeparatorField
. A LabelField
displays some text in a read-only manner, which is only fitting for a label. The LabelField
does not receive focus, so as the user scrolls around the screen the cursor will simply jump over the LabelField
.
In the FieldSampler
skeleton application, we put a LabelField
in the title portion of the MainScreen
. This is one of the most common uses of a LabelField
. However, they can be used for any other descriptive text needed on the screen. Maybe the label portion of an editable field has so much text that it really needs to be split into two lines of text—the second line should be done with a LabelField
. Or, you could have a large multiline edit field but using the label in that field just doesn't look good. In this case, you can place a LabelField
before the multiline edit field to properly label the field's purpose.