Adding Controls to a GroupBox

Adding controls to a GroupBox is essentially the same as adding controls to any other part of the form. The difference is that when you bind the control, it can only be bound to properties within the property the GroupBox is bound to. Your are going to add six controls to your GroupBox: two ComboBoxes (drop-downs), a TextBox, and three CaptionLabels.

To add controls to a GroupBox:

1.    Select CaptionLabel from the Toolbox. Draw three CaptionLabels within the GroupBox, ensuring that you have left enough space between them for the other controls you are going to add.

2.    Now bind the CaptionLabels (using the BindTo property) as you have done with the other controls in the training. Bind one CaptionLabel to DemographicCode, one to DemographicSubcode, and one to Comments. When you click the BindTo ellipsis, the API Property Chooser displays with properties only applicable to CustomerDemographics.
CusDemAPIchooser.png

3.    Next to the CaptionLabels you bound to the DemographicCode and DemographicSubcode, place two ComboBoxes (drop-downs).

4.    Bind the ComboBoxes to DemographicCode and DemographicSubcode respectively.

5.    Add a TextBox next to the Comments CaptionLabel and bind the TextBox to Comments.

6.    With the TextBox still highlighted, change the Multiline property to True.

Note.pngThis allows for a multiline text box.

Your screen should now look something like this:
CusDemDetailPage.png

7.    From the menu bar, click File > Save.

8.    From the menu bar, click File > Exit.
Your form automatically displays in Personify.

9.    Your form can now be used to add demographics to the selected customer.

10.  When you perform a search for and select a customer, your newly created DetailPage displays as shown below.
DetailPageCreated.png

11.  Click Add.
A new row is added to the grid and the fields in the GroupBox become active.

12.  To add Demographics for this customer, select an option from the Demographics ComboBox.

13.  Select an Option from the Sub-Demographics ComboBox.

14.  Click Save to save these new demographics for this customer

Note.pngThe options available in the Demographics and Sub-Demographics ComboBoxes can be modified using the Types and Codes Maintenance (APP005) screen. For this example, the options would be modifiable via the Demographic Type in the Customer Subsystem.