::com::sun::star::beans::XPropertySet LabelControl;
- Description
- references to a control model within the same document which should be used as a label.
Any user interface action which needs to refer to the control is assumed to use this
property.
A very common design method for forms is to group a data aware control with a label control,
with the latter describing the content of the former. For instance, you may have a
::com::sun::star::form::component::TextField , which is bound to the e-mail
column of your data source. Then you will probably add a
::com::sun::star::form::component::FixedText which's label is "E-Mail",
and associate it with the TextField by setting it as LabelControl .
Now if you imagine a component offering data search in a form, this component will examine
the LabelControl property, find the ::com::sun::star::form::component::FixedText ,
examine it's label, and use this label to refer to the ::com::sun::star::form::component::TextField .
When setting the property, a number of constraints apply:
- The object which is to be set has to support the following interfaces
- It has to be a part of the same document as the model who's property is to be modified.
- Additionally, the support of a special service, indicating that the model is of the right type,
is required. Which kind of service is in the request depends on the type of the control model.
For instance, text fields ( ::com::sun::star::form::component::TextField ) can be
labelled by label controls only ( ::com::sun::star::form::component::FixedText ),
and radio buttons ( ::com::sun::star::form::component::RadioButton ) can be labelled
by group boxes ( ::com::sun::star::form::component::GroupBox ) only.
|