Width.Autosize

Description

(RichText presentation style only) Whether the column or computed field input field adjusts its width according to the data it contains.

The Width.Autosize and Multiline properties can be set together so that the input field can display multiple lines.

Applies to

Column and Computed Field controls in the RichText presentation style

Syntax

PowerBuilder dot notation:

dw_control.Object.controlname.Width.Autosize

Describe and Modify argument:

"controlname.Width.Autosize { = ' value ' }"

Parameter

Description

controlname

The name of the column or computed field for which you want to get or set the Autosize setting.

value

(exp) Whether the width of the input field adjusts according to the data it contains. Values are:

  • Yes – The width adjusts according to the data.

  • No – The width is fixed and is set to the value of the Width property.

Usage


In the painter

Select an input field so that it is flashing, then right-click and select Properties from the pop-up menu. Set the value on the property sheet, Input Field tab, Fixed Size option.

Examples

Example 1

string setting

setting = dw1.Object.emp_name.Width.Autosize

Example 2

dw1.Object.emp_name.Width.Autosize = "yes"

Example 3

setting = dw1.Describe("emp_name.Width.Autosize")

Example 4

dw1.Modify("emp_name.Width.Autosize=yes")