Add a text entry field and save button

Part two of adding a comment box to a Px view, is adding the necessary widgets to display the text entry field and a save button.


Prerequisites:

Add the widgets for a text entry field and a save button

  1. In the Nav tree, drag and drop your StringWritable point onto the canvas in your Px page.
  2. In the Make Widget wizard, do the following:
    • Select From Palette
    • Open the kitPx palette
    • Select a SetPointFieldEditor widget
    • Click OK
  3. In the PxEditor canvas, double-click on the SetPointFieldEditor widget to open the Properties dialog box and configure the Set Point Binding ord property to the in16 slot, and click OK.

    The text entry field displays on the canvas.

  4. In the Palette side bar, open the kitPx palette and drag and drop a Save button widget to a position near the text entry field on the canvas.
  5. Design your comments box as desired, for example, you could enclose the comments box and save button in a Border pane and add a Label as shown below.
  6. Click the Save icon in the Workbench toolbar to save your changes.
  7. Switch to View mode, type some text in the text entry field.
    Entering text will activate the Save button. Your comments box should resemble the one shown here:
    Image

  8. Click the Save button
  9. In the Nav tree, expand the station’s History node to locate the StringWritable history and double-click to open the History Table view.
    Image

The history table contains a record of each saved text entry. In the next procedure, you configure your Px view to display the History Table view.