Class FormControlDescriptor
A control of a form, as its designer persisted it: the facts a form's declarations need.
public sealed record FormControlDescriptor : IEquatable<FormControlDescriptor>
- Inheritance
-
FormControlDescriptor
- Implements
- Inherited Members
Remarks
A form's controls are declarations of its class module: each one is a field of the form's class, of the control's
class, that the module's code refers to by name (Me.TextBox1) and handles the events of
(TextBox1_Change). That is why a form's designer data is read statically, on any platform, before any form is
shown.
Constructors
FormControlDescriptor(string, FormControlClass, int?, int?, IReadOnlyList<FormControlDescriptor>)
A control of a form, as its designer persisted it: the facts a form's declarations need.
public FormControlDescriptor(string Name, FormControlClass Class, int? TabIndex, int? Index, IReadOnlyList<FormControlDescriptor> Children)
Parameters
NamestringThe name of the control, which is the name of its field in the form's class.
ClassFormControlClassThe class of the control.
TabIndexint?The position of the control in its container's tab order, or
nullwhen the designer data gives none (a control that cannot take the focus, such as an MSFormsImage).Indexint?The index of the control in its control array (a Visual Basic 6.0 control with an
Indexproperty), ornullwhen it is not part of a control array.ChildrenIReadOnlyList<FormControlDescriptor>The controls the control contains (the controls of a
Frame, the pages of aMultiPage), in the order the designer persisted them.
Remarks
A form's controls are declarations of its class module: each one is a field of the form's class, of the control's
class, that the module's code refers to by name (Me.TextBox1) and handles the events of
(TextBox1_Change). That is why a form's designer data is read statically, on any platform, before any form is
shown.
Properties
Children
The controls the control contains (the controls of a Frame, the pages of a
MultiPage), in the order the designer persisted them.
public IReadOnlyList<FormControlDescriptor> Children { get; init; }
Property Value
Class
The class of the control.
public FormControlClass Class { get; init; }
Property Value
Index
The index of the control in its control array (a Visual Basic 6.0 control with an Index
property), or null when it is not part of a control array.
public int? Index { get; init; }
Property Value
- int?
Name
The name of the control, which is the name of its field in the form's class.
public string Name { get; init; }
Property Value
TabIndex
The position of the control in its container's tab order, or null when the designer data
gives none (a control that cannot take the focus, such as an MSForms Image).
public int? TabIndex { get; init; }
Property Value
- int?
Methods
DescendantsAndSelf()
The control and every control it contains, at any depth, in the order the designer persisted them (the control first).
public IEnumerable<FormControlDescriptor> DescendantsAndSelf()