Get the control enclosed in the outer control The control is considered enclosed if: (a) the midpoint of the 'initial value' control lies inside the outer control display area (b) the 'initial value' control is narrower than the outer control (c) the combo and textbox have the same parent object (so that superimposed textboxes and combos on different tabs, for example, are not regarded as linked) (d) the textbox tag contains the passed string (or doesn't contain it if it starts with '-')
The target form
The enclosing control
The tag string to match when selecting an enclosed textbox, since there may be more than one textbox enclosed in the control. If tagStr is an empty string, the first enclosed textbox found is returned. If tagStr starts with '-', then the first textbox with a tag NOT containing tagStr (less the '-') is returned. Otherwise, the first textbox with a tag containing tagStr is returned
xf.Controls.GetEnclosedTextbox cboCustomerID