Adobe 65007312 Programming Guide - Page 93

Property, Datatype, Description, value when the S

Page 93 highlights

CHAPTER 5: Creating a User Interface for Your Plug-in Property alignment text_color immediate Datatype string LrColor Boolean auto_completion Boolean completion table or function increment number large_increment number validate function value_to_string function string_to_value function wraps Boolean User interface elements 93 Description Alignment of text in frame, left (the default), center, or right. The color of displayed text. Default is black. If true, the field commits its value as the user is typing, and the validate function is called for every change. Default is false, validation occurs on loss of focus. True if the field should auto complete as the user types. Default is false. A table of strings for completion, or a function that returns a table of strings: myCompletion( view, partialWord ) If field is numeric, the amount to increment the value (without SHIFT key). If the precision is 0, default is 1; otherwise default is 0.1. If field is numeric, the amount to increment the value when the SHIFT key is held down. If the precision is 0, default is 10; otherwise default is 1. A function called to validate the value: myValidate( view, value ) Returns result, value, message: result: (Boolean) True if value was valid. value: (any) The new value. message: (string) An error message to be displayed if result is false. An optional conversion function, called to convert a non-string value to a display string. Takes arguments view (this control) and value (the entered value), and returns a string. An optional conversion function, called to convert the display string to a non-string value. Takes arguments view (this control) and string (the string), and returns a value of the required type. True to wrap text. Default is true.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204

C
HAPTER
5: Creating a User Interface for Your Plug-in
User interface elements
93
alignment
string
Alignment of text in frame,
left
(the default),
center
, or
right
.
text_color
LrColor
The color of displayed text. Default is black.
immediate
Boolean
If true, the field commits its value as the user is
typing, and the validate function is called for every
change. Default is false, validation occurs on loss of
focus.
auto_completion
Boolean
True if the field should auto complete as the user
types. Default is false.
completion
table or function
A table of strings for completion, or a function that
returns a table of strings:
myCompletion( view, partialWord )
increment
number
If field is numeric, the amount to increment the
value (without S
HIFT
key). If the precision is 0, default
is 1; otherwise default is 0.1.
large_increment
number
If field is numeric, the amount to increment the
value when the S
HIFT
key is held down. If the
precision is 0, default is 10; otherwise default is 1.
validate
function
A function called to validate the value:
myValidate( view, value )
Returns
result
,
value
,
message
:
result
: (Boolean) True if value was valid.
value
: (any) The new value.
message
: (string) An error message to be
displayed if result is false.
value_to_string
function
An optional conversion function, called to convert a
non-string value to a display string. Takes arguments
view
(this control) and
value
(the entered value),
and returns a string.
string_to_value
function
An optional conversion function, called to convert
the display string to a non-string value. Takes
arguments
view
(this control) and
string
(the
string), and returns a value of the required type.
wraps
Boolean
True to wrap text. Default is true.
Property
Datatype
Description