9 214 SET_DD_ATTRIBUTES

LANSA Technical

9.214 SET_DD_ATTRIBUTES

Þ Note: Built-In Function Rules.

Allows the characteristics of a field that is to be visualized as a drop-down to be controlled.

For use with

LANSA for i

NO

Visual LANSA for Windows

YES

Visual LANSA for Linux

YES

 

 

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

The name of the drop down. It must begin with "DD" and be in the format DDxx. This name corresponds to the name used in the field's input or output attributes and the name used in the ADD_DD_VALUES Built-In Function.

4

4

 

 

2

A

Req

The style to be used when visualizing the drop down field. Allowable values are:

A - The default single line non-editable drop down.

B - A single line editable drop down.

C - A multiple line editable drop down. Under Windows this style is visualized as a combo-box.

D - A multiple line non-editable drop down. This style is visualized as a list box.

Invalid values in this argument are ignored and they are converted to style A.

1

1

 

 

3

N

Opt

The total number of panels "lines" that the drop down control is to occupy on the panel or window.

For styles A and B this value indicates the number of lines that the drop down should occupy when the user has dropped it down.

For styles C and D this value indicates the number of lines that the drop down control should permanently occupy on the panel.

This argument must be a valid number in the range 1 to 20. Values outside this range are ignored and the default value is used.

The value is specified in panel "lines", where a panel is up to 24 lines long. The actual number of items that can be visualized in the drop down depends upon the height of the font being used.

The default length is the least of

a) no. of items in the List;

b) remaining lines on the Panel.

1

7

0

00

 

 

Return Values

No return values.

General Technical Notes

  • Once a drop down's attributes are set they remain in effect for the duration of the current job / process. Subsequent use of this Built-In Function for the same drop down name will effectively replace (ie: overwrite) its current attribute values.
  • In all styles, using a length of 1 is fairly nonsensical.
  • If the length value is set so that the drop down extends outside of the current panel or pop-up window then unpredictable results and/or application failure may result.
  • For styles C and D, setting the length value so that the drop down overlaps any other object in the panel or window may cause unpredictable results and/or application failure.
  • You cannot put duplicate data into a drop down. Duplicated items in a drop down are treated as the same item. You must ensure that your application does NOT put duplicated data into a drop down.
  • There are finite limits to the total storage occupied by all the items in a drop down. Typically this is 32K, but you should never be anywhere near this limit because of usability limitations.
  • There are finite limits to the usability of drop downs that are met before storage limits are exceeded. Typically drop downs contain up to around 100 items. Drop downs containing thousands of items are not advisable and should not be used.