@@ -143,6 +143,53 @@ To add to a window ``w``::
143
143
144
144
--------------------------------------------------------------------------------
145
145
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
+
146
193
.. _control-type-edittext :
147
194
148
195
edittext
@@ -796,7 +843,8 @@ characters
796
843
Type: ``Number ``
797
844
798
845
Used 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
800
848
the font used by the control. Setting this property is the best way to
801
849
reserve space in a control for a maximum number of characters to
802
850
display.
@@ -1277,7 +1325,7 @@ new value into the ``text`` string at the current insertion point. The
1277
1325
``textselection `` value is reset to an empty string after it modifies the
1278
1326
``text `` value.
1279
1327
1280
- .. note :: Setting the ``textselection`` property before the edittext
1328
+ .. note :: Setting the ``textselection`` property before the :ref:`EditText`
1281
1329
control's parent Window exists is an undefined operation.
1282
1330
1283
1331
--------------------------------------------------------------------------------
@@ -1852,23 +1900,26 @@ onChange
1852
1900
Called when the user finishes making a change in one of the following control
1853
1901
types:
1854
1902
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.
1865
1914
- For a :ref: `Slider ` or :ref: `Scrollbar `, called when the user has finished
1866
1915
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
1869
1918
property directly or removes a selected item from the list, or when the user
1870
1919
changes the selection.
1871
1920
1921
+ .. note :: The ``EditNumber`` control was added in Photoshop 20.0 (CC 2019).
1922
+
1872
1923
--------------------------------------------------------------------------------
1873
1924
1874
1925
.. _control-event-onchanging :
@@ -1877,13 +1928,15 @@ onChanging
1877
1928
**********
1878
1929
Called for each incremental change in one of the following control types:
1879
1930
1880
- =============== ================ =============
1881
- :ref: `EditText ` :ref: `Scrollbar ` :ref: `Slider `
1882
- =============== ================ =============
1931
+ ================= =============== ================ =============
1932
+ :ref: `EditNumber ` :ref: ` EditText ` :ref: `Scrollbar ` :ref: `Slider `
1933
+ ================= =============== ================ =============
1883
1934
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.
1885
1936
- For a :ref: `Slider ` or :ref: `Scrollbar `, called for any motion of the position marker.
1886
1937
1938
+ .. note :: The ``EditNumber`` control was added in Photoshop 20.0 (CC 2019).
1939
+
1887
1940
--------------------------------------------------------------------------------
1888
1941
1889
1942
.. _control-event-oncollapse :
0 commit comments