Target Types:
Applying Properties by Platform Type and Screen Resolution

If you are working on a Linked Mode Project, or have multiple screen resolutions for a Target Platform, the Target Properties allow you to have different values for some form and control Properties, e.g. caption, style, visible, image etc., on different screen resolutions. For example, you could have a longer Caption on the title bar when a device is in landscape mode than when the same device is in portrait mode.

The Target Properties form a category within the Properties for a form or control and can be viewed and edited within the Properties Pane.

 

By default, editing Properties under one screen resolution will affect all associated screen resolutions.

In Linked Mode this means that editing the Properties for a form or control under any screen resolution will change the Properties for the same form or control under all your other screen resolutions across all your Target Platforms.

In Mixed Mode, editing Properties under one screen resolution will affect the same form or control under any other screen resolutions you have specified but only within the same Target Platform as the form or control you edit.

 

The Target Properties allow you to change this default behaviour for certain Properties and provide different settings under different screen resolutions.

 

To set the Target Properties for a form or control under a specific screen resolution:

Display the relevant form in the App Studio Workspace.

Choose the required screen resolution from the list of resolutions in the right-hand drop-down list at the top of the form window.

To edit Properties for the form, click on the form's background, or to edit the properties for a particular control, select the control instead.

Find the Target category in the Properties Pane. By default, this is set to Default Properties. The default values are applied to the selected form or control under any screen resolution which isn't selected to have its own values.

In the Target Type Property, click on the browse button, Picture showing the Browse button.. A list of available screen resolutions will be displayed. Select the current screen resolution from the list.

A message will be displayed asking if you want to add Properties for this screen resolution to the control. Choose the Yes button.

Now you can edit the rest of the Properties in the Target category and your changes will only affect the currently selected form or control under the current screen resolution.

 

Although in the steps above we displayed the form under the screen resolution we wanted to work with before editing the Target Properties, you can in fact edit these Properties under any screen resolution. However, remember that if you edit the Properties for one resolution under a different resolution, your changes will not be reflected on the currently displayed form.

To edit the Target Properties for a different screen resolution than the one currently displayed, you first need to add the required screen resolution to the list of resolutions which can have different Target Properties. You do this in the same way as described above, except you can display the form under any screen resolution and Platform. Having displayed the form, select the form or control and then choose the browse button, Picture showing the Browse button., in the Target Type Property. Choose the Platform/screen resolution you want from the list displayed and answer Yes to the confirmatory prompt. Now the remaining Target Properties and any changes you make to them relate to the currently selected screen resolution. Remember, if this isn't the same as the screen resolution of the currently displayed form, any changes you make will not be reflected in the displayed form.

Beside the browse button in the Target Type Property is a drop-down list button, Picture showing the Drop-down list button.. Choosing this button displays a list of the screen resolutions which you have added to the list for the currently selected form or control. Once you have added a screen resolution for a form or control, you can view and edit the current values for that screen resolution by choosing it from this list. The list also includes the Default Properties target type allowing you to edit the Default Properties.

By default, the drop-down list also includes an All Targets option. If you select this option BEFORE you edit the Target Properties any changes you make will be applied to the selected form or control under ALL devices/screen resolutions. This option is affected by the Enhanced Property Grid option on the Advanced tab in the App Studio Settings and can be disabled by deselecting the option. Note however, that the Enhanced Property Grid option also affects other aspects of the Property Grid as well.

 

If you want to delete a screen resolution from the list and return a form or control under that screen resolution to the Default Properties, select the form or control and then choose the browse button, Picture showing the Browse button., in the Target Type Property. The list of screen resolutions will be displayed as before. Choose the screen resolution you want to remove. A message will be displayed asking you to confirm your choice. Choose the Yes button to remove the screen resolution. The form or control will automatically be returned to the Default Properties under the removed screen resolution.

The Target Properties for each individual form and control are independent and you will need to select the required screen resolutions for each form and control separately. For example, selecting a screen resolution for a form doesn't also select that screen resolution for the controls on the form.

  • As a shortcut, right-clicking on a form or control and choosing Add Target Properties will set the Target Type Property for that form or control to the current Target Platform and screen resolution. The form or control will now have its own values for the Target Properties. Right-clicking on a form or control and choosing Add All Target Properties will set the Target Type Property to the appropriate value for that form or control under ALL device platforms/screen resolutions.