ddlb.property

Description

Properties that control the appearance and behavior of a column with the DropDownListBox edit style.

Applies to

Column controls

Syntax

DataWindow .NET dot notation:

(( DDLB) colname.EditStyle).property [C#]
CType(colname.EditStyle, DDLB).property [Visual Basic]

Describe and Modify argument:

"columnname.ddlb.property { = value }"

Parameter

Description

columnname

The name of a column that has the DropDownListBox edit style.

property

A property for the DropDownListBox column. Properties and their settings are listed in the table below.

value

The value to be assigned to the property. For ddlb properties, value cannot be a DataWindow expression.

Property for ddlb

Value

AllowEdit

Whether the user can type a value as well as choose from the DropDownListBox’s list.

Values are:

  • Yes – Typing is allowed.

  • No – (Default) Typing is not allowed.

AutoHScroll

Whether the DropDownListBox automatically scrolls horizontally when the user enters or deletes data.

Values are:

  • Yes – (Default) Scroll horizontally automatically.

  • No – Do not scroll automatically.

Case

The case of the text in the DropDownListBox.

Values are:

  • Any – Character of any case allowed.

  • Upper – Characters converted to uppercase.

  • Lower – Characters converted to lowercase.

Limit

An integer from 0 – 32767 specifying the maximum number of characters that can be entered in the DropDownListBox. Zero means unlimited.

NilIsNull

Whether to set the data value of the DropDownListBox to null when the user leaves the edit box blank.

Values are:

  • Yes – Make the empty string null.

  • No – Do not make the empty string null.

Required

Whether the column is required.

Values are:

  • Yes – Required.

  • No – (Default) Not required.

ShowList

Whether the ListBox portion of the DropDownListBox displays when the column has focus. A down arrow does not display at the right end of the DropDownListBox when ddlb.ShowList is yes.

Values are:

  • Yes – Display the list whenever the column has focus.

  • No – Do not display the list until the user selects the column.

Sorted

Whether the list in the DropDownListBox is sorted.

Values are:

  • Yes – The list is sorted.

  • No – The list is not sorted.

UseAsBorder

Whether a down arrow displays at the right end of the DropDownListBox.

Values are:

  • Yes – Display the arrow.

  • No – Do not display the arrow.

Note that if ShowList is set to Yes, the column ignores the UseAsBorder property and the arrow never displays.

VScrollBar

Whether a vertical scroll bar displays in the DropDownListBox for long lists.

Values are:

  • Yes – Display a vertical scroll bar.

  • No – Do not display a vertical scroll bar.

Usage


In the painter

Select the control and set the value in the Properties window, Behavior category, when EditStyle is DropDownListBox.

In DataWindow .NET, you can use the DDLB class to set DropDownListBox style properties using dot notation. See the description of the DDLB class in the online Help in Visual Studio .NET for a complete list of properties. Some properties have different names and are set differently. For example, the Case DataWindow object property is equivalent to the CharacterCasing property in DataWindow .NET, which uses an enumeration.

Examples

Example 1

[Visual Basic]
ls_data = dw1.Describe("emp_status.ddlb.AllowEdit")

dw1.Modify("emp_status.ddlb.Case='Any'")

dw1.Modify("emp_status.ddlb.Limit=30")

Example 2

[Visual Basic]
If TypeOf status.EditStyle Is DDLB Then
   CType(status.EditStyle, DDLB).AllowEdit = True
ElseIf
...

[C#]
if (emp_status.EditStyle is DDLB)
{
   ((DDLB)emp_status.EditStyle).AllowEdit = true;
}
else
....