AllowEdit – PB Docs 2021

AllowEdit

property for PowerScript controls

Applies to

DropDownListBox, DropDownPictureListBox, DatePicker, and
RibbonComboBoxItem controls

Description

When AllowEdit is enabled in a drop-down list, the user can edit the
selection in the text box of the control. If AllowEdit is not enabled, the
user can only make a selection from the list and cannot edit the
selection.

In a DatePicker control, the user can modify the date in the control
by picking a date from the drop-down calendar or by modifying the selected
part of the date (year, month, or day) in the control if the format of the
part is numeric. When AllowEdit is enabled, pressing F2 or placing the
cursor in the control selects all the text in the control for editing.
When the control loses focus, the text in the control reverts to its
original value and the UserString event is fired. In the UserString event
script, you can parse the string entered by the user and change the value
in the control if the string passes validation.

To change the date by modifying one part of the date at a time when
AllowEdit is enabled, the user can tab into the control and use the arrow
keys to move between parts of the date.

When a part of the date is changed, the change is retained if it is
valid. If the user enters a year, month, or day that is out of the range
specified for the control, that value reverts to its previous value. If
the user enters a day that is greater than the number of days in the month
in the control, or a month greater than 12, the second digit entered is
retained in the control.

Usage

In a painter

To allow editing:

  • On the General page of the control’s Properties view, select the
    AllowEdit check box.

In scripts

The AllowEdit property takes a boolean value.

This example sets AllowEdit for a DropDownListBox:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x