@@ -143,6 +143,53 @@ To add to a window ``w``::
143143
144144--------------------------------------------------------------------------------
145145
146+ .. _control-type-editnumber :
147+
148+ editnumber
149+ **********
150+ Class Name: ``EditNumber ``
151+
152+ An editable text field the user can enter decimal numbers into. Fractions are allowed.
153+ Calls the :ref: `control-event-onchange ` callback if the text is changed and the user types
154+ ``ENTER `` or the control loses focus, or if its :ref: `controlobj-notify ` method is called.
155+ Calls the :ref: `control-event-onchanging ` callback when any change is made to the text.
156+ The ``textselection `` property contains currently selected text.
157+
158+ To add to a window ``w ``::
159+
160+ w.add ("editnumber" [, bounds, text, minValue, maxValue, {creation_properties}]);
161+
162+ ======================= ======================================================================================
163+ ``bounds `` Optional. The control's position and size.
164+ ``text `` Optional. The text displayed in the control.
165+ ``minValue `` Optional. Minimum accepted value of number to be entered.
166+ ``maxValue `` Optional. Maximum accepted value of number to be entered.
167+ ``creation_properties `` Optional. An object that contains any of the following properties:
168+
169+ - ``name ``: A unique name for the control.
170+ - ``readonly ``: When false (the default), the control accepts text
171+ input. When true, the control does not accept input but only
172+ displays the contents of the ``text `` property.
173+ - ``noecho ``: When false (the default), the control displays input
174+ text. When true, the control does not display input text
175+ (used for password input fields).
176+ - ``enterKeySignalsOnChange ``: When false (the default), the
177+ control signals an :ref: `control-event-onchange ` event when the editable text is
178+ changed and the control loses the keyboard focus (that is,
179+ the user tabs to another control, clicks outside the control, or
180+ types ``ENTER ``). When true, the control only signals an
181+ ``onChange `` event when the editable text is changed and the
182+ user types ``ENTER ``; other changes to the keyboard focus do
183+ not signal the event.
184+ - ``borderless ``: When true, the control is drawn with no
185+ border. Default is false.
186+
187+ ======================= ======================================================================================
188+
189+ .. note :: The ``EditNumber`` control was added in Photoshop 20.0 (CC 2019).
190+
191+ --------------------------------------------------------------------------------
192+
146193.. _control-type-edittext :
147194
148195edittext
@@ -796,7 +843,8 @@ characters
796843Type: ``Number ``
797844
798845Used by the :ref: `LayoutManager-object ` to determine the default
799- :ref: `controlobj-preferredSize ` for a :ref: `StaticText ` or :ref: `EditText ` control. The control will be made wide enough to display the given number of `X ` characters in
846+ :ref: `controlobj-preferredSize ` for a :ref: `StaticText ` or :ref: `EditText ` control.
847+ The control will be made wide enough to display the given number of `X ` characters in
800848the font used by the control. Setting this property is the best way to
801849reserve space in a control for a maximum number of characters to
802850display.
@@ -1277,7 +1325,7 @@ new value into the ``text`` string at the current insertion point. The
12771325``textselection `` value is reset to an empty string after it modifies the
12781326``text `` value.
12791327
1280- .. note :: Setting the ``textselection`` property before the edittext
1328+ .. note :: Setting the ``textselection`` property before the :ref:`EditText`
12811329 control's parent Window exists is an undefined operation.
12821330
12831331--------------------------------------------------------------------------------
@@ -1852,23 +1900,26 @@ onChange
18521900Called when the user finishes making a change in one of the following control
18531901types:
18541902
1855- ================================ ================
1856- :ref: `control-type-dropdownlist ` :ref: `Scrollbar `
1857- :ref: `EditText ` :ref: `Slider `
1858- :ref: `control-type-listbox ` :ref: `control-type-treeview `
1859- ================================ ================
1860-
1861- - For an :ref: `EditText ` control, called only when the change is complete-that is, when
1862- focus moves to another control, or the user types ``ENTER ``. The exact behavior
1863- depends on the creation parameter ``enterKeySignalsOnChange ``; see the
1864- :ref: `edittext <control-type-edittext >` description.
1903+ ============================ ================
1904+ :ref: `EditNumber ` :ref: `EditText `
1905+ :ref: `Scrollbar ` :ref: `Slider `
1906+ :ref: `control-type-listbox ` :ref: `control-type-dropdownlist `
1907+ :ref: `control-type-treeview `
1908+ ============================ ================
1909+
1910+ - For :ref: `EditNumber ` and :ref: `EditText ` controls, called only when the change is
1911+ complete-that is, when focus moves to another control, or the user types ``ENTER ``.
1912+ The exact behavior depends on the creation parameter ``enterKeySignalsOnChange ``; see
1913+ the :ref: `edittext <control-type-edittext >` description.
18651914- For a :ref: `Slider ` or :ref: `Scrollbar `, called when the user has finished
18661915 dragging the position marker or has clicked the control.
1867- - For a :ref: `control-type-listbox `, :ref: `control-type-dropdownlist ` or :ref: `control-type-treeview ` control, called
1868- whenever the selection property changes. This can happen when a script sets the
1916+ - For a :ref: `control-type-listbox `, :ref: `control-type-dropdownlist ` or :ref: `control-type-treeview `
1917+ control, called whenever the selection property changes. This can happen when a script sets the
18691918 property directly or removes a selected item from the list, or when the user
18701919 changes the selection.
18711920
1921+ .. note :: The ``EditNumber`` control was added in Photoshop 20.0 (CC 2019).
1922+
18721923--------------------------------------------------------------------------------
18731924
18741925.. _control-event-onchanging :
@@ -1877,13 +1928,15 @@ onChanging
18771928**********
18781929Called for each incremental change in one of the following control types:
18791930
1880- =============== ================ =============
1881- :ref: `EditText ` :ref: `Scrollbar ` :ref: `Slider `
1882- =============== ================ =============
1931+ ================= =============== ================ =============
1932+ :ref: `EditNumber ` :ref: ` EditText ` :ref: `Scrollbar ` :ref: `Slider `
1933+ ================= =============== ================ =============
18831934
1884- - For an :ref: `EditText ` control , called for each keypress while the control has focus.
1935+ - For :ref: ` EditNumber ` and :ref: `EditText ` controls , called for each keypress while the control has focus.
18851936- For a :ref: `Slider ` or :ref: `Scrollbar `, called for any motion of the position marker.
18861937
1938+ .. note :: The ``EditNumber`` control was added in Photoshop 20.0 (CC 2019).
1939+
18871940--------------------------------------------------------------------------------
18881941
18891942.. _control-event-oncollapse :
0 commit comments