Add Controls to Detail Forms

This article contains the following topics:
casm1401
This article contains the following topics:
HID_Add Controls to Details Forms
The Controls available in the ToolBox vary depending on the type of form that is open currently. When a Detail type form is open, the following controls are available in the ToolBox.
  • Checkbox
  • Command Button
  • Date
  • Dropdown Box
  • Hierarchical Lookup Box
  • Tab
  • Lookup Box
  • Read Only Date
  • Read Only Lookup Box
  • Read Only Text Box
  • Text Box
  • Conditional If
  • Conditional Else If
  • Conditional Else
  • Conditional End If
  • Object Button
  • Row
Add a Checkbox
HID_Add a Checkbox
You can add a Checkbox control to a form.
Follow these steps:
  1. Click the CheckBox button check box on the Control Palette, and then click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Checkbox control is placed on the form.
  2. Click the control, click the right mouse button, and select Properties from the dropdown list.
    The Properties dialog lists the following properties for a checkbox control:
Add a Date
HID_Add a Date
You can add a Date control to a form.
Follow these steps:
  1. Click the Date button date on the Control Palette and then, click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Date control is placed on the form.
  2. Click the control, click the right mouse button, and select Properties from the dropdown list.
    The Properties dialog lists the following properties for a date control:
Add a Dropdown Box
HID_Add a Dropdown Box
You can add a Dropdown box control to a form.
Follow these steps:
  1. Click the Dropdown button dropdown box on the Control Palette, and then click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Dropdown Box control is placed on the form.
  2. Click the control, click the right mouse button, and select Properties from the dropdown list.
    The Properties dialog lists the following properties for a dropdown control:
Add a Hierarchical Lookup Box
HID_Add a Hierarchical Lookup Box
You can add a Hierarchical Lookup Box control to a form.
Follow these steps:
  1. Click the Hierarchical Lookup button hierarchical lookup box on the Control Palette, and then click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Hierarchical Lookup control is placed on the form.
  2. Click the control, click the right mouse button, and select Properties from the dropdown list.
    The Properties dialog lists the following properties for a hierarchical lookup control:
Add a HTML Editor
HID_Add a HTML Editor
You can add a HTML Editor to a form.
Follow these steps:
  1. Click the HTML Editor button html editor on the Control Palette, and then click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The HTML Editor is placed on the form.
  2. Click the control, click the right mouse button, and select Properties from the dropdown list.
    The Properties dialog lists the following properties for a HTML editor control:
Add a Notebook
HID_Add a Notebook
Add a notebook to modify how HTMPL forms appear.
Follow these steps:
  1. Create a form in WSP, such as a form based on detail.template.
    The HTMPL file opens.
  2. Click the Source view and add the following lines of code:
    <PDM_MACRO name=startNotebook hdr=cng_nb> <PDM_MACRO name=endNotebook>
  3. Click the Design view.
    The notebook area appears after the text box, such as shown in the following example:
    Shows the notebook area in the Design view.
  4. Click the Source view and add the following example code after the <PDM_MACRO name=startNotebook hdr=cng_nb> line:
    <PDM_MACRO name=startTabGroup title="Additional Information">
    The following example shows the updated notebook area in Design view:
    Shows the Additional Information label.
  5. Click the Source view and add the following example code after the previous addition:
    <PDM_IF "$args.id" == "0"> <PDM_MACRO name=tab title="Attachments" height=300 id=attmnt src="OP=SHOW_DETAIL+HTMPL=xx_attmnt_tab.htmpl+FACTORY=cr+PERSID=$args.persistent_id+NO_DP=yes"> <PDM_ELSE
    The following example shows the updated notebook area in Design view:
    Shows the Attachment tab.
  6. Continue adding tab groups and end the notebook with the following code:
    <PDM_MACRO name=endNotebook>
    Open default forms in WSP to view how notebooks and nested tab groups appear. For example, open the detail_in.htmpl form. You can also move tabs and tab groups within a notebook using drag-and-drop in Design view. Moving a tab group moves all the tabs within the group with it.
  7. To insert a tab or tab group, right-click a control or within the notebook background and select Insert Tab, Insert Tab Group, or Insert Control.
    If you select Insert Tab or Insert Tab Group, WSP inserts a new tab or tab group to the left of the currently selected control. If you select Insert Control, WSP displays the Insert Control dialog that lets you add the desired control to the form.
  8. Click Preview.
    Your unpublished changes appear in the web browser.
  9. Save the form.
    The notebook is added.
Add a Lookup Box
HID_Add a Lookup Box
You can add a Lookup Box control to a form.
Follow these steps:
  1. Click the Lookup button lookup box on the Control Palette, and then click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Lookup Box control is placed on the form.
  2. Click the control, click the right mouse button, and select Properties from the dropdown list.
    The Properties dialog lists the following properties for a lookup control:
Add a Read Only Date
HID_Add a Read Only Date
You can add a Read Only Date control to a form.
Follow these steps:
  1. Click the Read Only Date button Readonly Date Button on the Control Palette and then, click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Read Only Date control is placed on the form.
  2. Click the control, click the right mouse button, and select Properties from the dropdown list.
    The Properties dialog lists the following properties for a read-only date control:
 
Add a Read Only Lookup Box
HID_Add a Read Only Lookup Box
You can add a Read Only lookup box control to a form.
Follow these steps:
  1. Click the Read Only Lookup button Readonly Lookup Box on the Control Palette, and then click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Read Only Lookup control is placed on the form.
  2. Click the control, click the right mouse button, and select Properties from the dropdown list.
    The Properties dialog lists the following properties for a read-only lookup control:
Add a Read Only Text Box
HID_Add a Read Only Text Box
You can add a Read Only text box control to a form.
Follow these steps:
  1. Click the Read Only Text Box button Read Only Text Box on the Control Palette, and then click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Read Only Text Box control is placed on the form.
  2. Click the control, click the right mouse button, and select Properties from the dropdown list.
    The Properties dialog lists the following properties for a read-only text box control:
Add a Text Box
HID_Add a Text Box
You can add a text box control to a form.
Follow these steps:
  1. Click the Text Box button Text Box Button on the toolbar, and then click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Text Box control is placed on the form.
  2. Click the control, click the right mouse button, and select Properties from the dropdown list.
    The Properties dialog lists the following properties for a text box control:
Add Conditional If
HID_Add Conditional If
You can add a conditional if control to a form.
Follow these steps:
  1. Click the If button if button on the Control Palette, and then click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Conditional If control is placed on the form.
  2. Click the control, click the right mouse button, and select Properties from the dropdown list.
    The Properties dialog lists the following properties for an if condition:
    Condition
Add Conditional Else If
HID_Add Conditional Else If
You can add a conditional else if control to a form.
Follow these steps:
  1. Click the Elif button else if button on the Control Palette, and then click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Conditional Else If control is placed on the form.
  2. Click the control, click the right mouse button, and select Properties from the dropdown list.
    The Properties dialog lists the following properties for an else if condition:
    Condition
Add Conditional Else
HID_Add Conditional Else
To add a conditional else control to a form:
  1. Click the Else button else button on the Control Palette, and then click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Conditional Else control is placed on the form.
Add Conditional End If
HID_Add Conditional End If
To add a conditional end if control to a form:
  1. Click the Endif button end if button on the Control Palette, and then click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Conditional End If control is placed on the form.
Add Object Button
HID_Add Object Button
You can add an Object Button control to a form.
Follow these steps:
  1. Click the Object button Object Button on the Control Palette, and then click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    The Object Button control is placed on the form.
  2. Click the control, click the right mouse button, and select Properties from the dropdown list.
    The Object Code dialog appears so you can define the source associated with the Object control.
Add a Row
HID_Add a Row
To add a Row control to a form:
  1. Click the ROW button Row Button on the Control Palette and then, click the left mouse button and hold it down as you drag-and-drop it on the desired location.
    A blank Row is placed on the form. You can place the controls on the row.