Dragging and dropping collection properties as components on forms

To drag and drop a property from a collection as a component on a form:

  1. With a form open and in Design Mode, select the Form properties sheet.
  2. Select the Collections tab.
  3. Expand the collection that contains the property you want to add as a component.
  4. Drag the property over to the form.
  5. Drop the property in an appropriate area:
    • If you drop the property in the Detail View area, both a static and an edit box are created. The point where the drop is initiated is the left side of the edit box, and the static is created to the left of that point.

      If the IDO property contains a list of properties, or if the property class extension contains a list source, a combo box is created.

      WinStudio then applies "arrange rows" to modify the size and alignment of the components.

      If the form contains a form grid, that is, it is a multiview form, and if the form grid is bound to the same component as the IDO property, then a grid column component is also added at the end of the grid.

    • If you drop the property into a grid, either into a standard grid on a form or into the Grid View of a multiview form, and if the grid is bound to the same collection as the IDO property, a grid column component is added to the end of the grid. If the grid is not bound to the same collection, no column is created.
  6. After the drag-and-drop operation is complete, use the Form Property Editor to edit the properties of the new component, as needed.
注意:
  • If the property or property class extension contains a caption, this caption is shown in the grid and static.
  • If the Edit component type is not appropriate for the property, change the component type after the drag and drop is complete. For example, a property with a True/False value could use the CheckBox component type.
  • The name of the component is in the format propertynameGridCol, propertynameEdit, and propertynameStatic. If a component with that name already exists, an incrementing number is added to the end of the name.
相关主题