Sizing an Object Dynamically

Certain graphical objects that contain text, or are attached to an attribute, can have their height and width resized dynamically to fit the text or attribute to which they are attached.

The graphical objects that can be resized are listed in the following table with the applicable resize function.

 

Control Type

Control Type

Text

Both

Label

 

 

YES

Button

 

YES

 

SubmitButton

 

YES

 

PasswordField

 

 

YES

RadioButton

 

YES

 

CheckBox

 

YES

 

TextField

YES

 

 

TextArea

YES

 

 

Both means that the control can be resized to either the length of the attribute or the length of the text which ever is longest.

The resize calculation considers text alignment for the controls from the TextAlign property. Resizing does not occur when the SynchronizeField property is set to Yes on the component.

To set the relative size of an object, perform the following:

  1. Open a form.

  2. Select the graphical object that you want to resize,

  3. On the Format menu, click Make Same Size.

  4. On the sub-menu, click either As Text or As Attribute.

The menu entries are only available if the object has either Text or an Attribute attached.

When a group of objects are selected, and none of the selected objects have text or an attribute attached, then none of the menu entries are available. If the group has at least one object with text and at least one object with an attribute attached, both menu entries are available.

If an object has both text and an attribute attached, the object is resized to either the length of the attribute or the width of the text whichever is longer.

As Text − The width and height of the object are resized to the pixel width and height of the current text based on the font for this object.

To make an object with a PresentationType property of Fixed or Print, the same size as text, the object width is resized to the character width of its text based on the font for this control.

As Attribute − The width and height of the object is resized to the pixel width and height of the total length of the attribute based on the font for this object.

To make an object with a PresentationType property of Fixed or Print the same size as the attribute, the object width is resized to the character width of its total length based on the font for this control.

The total length is the sum of attribute length and extra characters applicable for value of the PrintFormat property, if the attribute is a SignedNumber. The table below identifies the number of extra characters required for each PrintFormat value and PresentationType.

 

Graphical

Extra Characters

Fixed

Extra Characters

Print

Extra Characters

CR

2

CR

2

Blank

1--2

DR

2

DR

2

CR

2

+

1

+

1

DR

2

_

1

_

1

+

1

 

 

 

 

_

1

 

 

 

 

$

2--3

 

 

 

 

*

1--2