1wxSpinCtrl(3)              Erlang Module Definition              wxSpinCtrl(3)
2
3
4

NAME

6       wxSpinCtrl - Functions for wxSpinCtrl class
7

DESCRIPTION

9       wxSpinCtrl combines wxTextCtrl and wxSpinButton in one control.
10
11       Styles
12
13       This class supports the following styles:
14
15       See: wxSpinButton, wxSpinCtrlDouble (not implemented in wx), wxControl
16
17       This  class is derived (and can use functions) from: wxControl wxWindow
18       wxEvtHandler
19
20       wxWidgets docs: wxSpinCtrl
21

EVENTS

23       Event types emitted from this class: command_spinctrl_updated
24

DATA TYPES

26       wxSpinCtrl() = wx:wx_object()
27

EXPORTS

29       new() -> wxSpinCtrl()
30
31              Default constructor.
32
33       new(Parent) -> wxSpinCtrl()
34
35              Types:
36
37                 Parent = wxWindow:wxWindow()
38
39       new(Parent, Options :: [Option]) -> wxSpinCtrl()
40
41              Types:
42
43                 Parent = wxWindow:wxWindow()
44                 Option =
45                     {id, integer()} |
46                     {value, unicode:chardata()} |
47                     {pos, {X :: integer(), Y :: integer()}} |
48                     {size, {W :: integer(), H :: integer()}} |
49                     {style, integer()} |
50                     {min, integer()} |
51                     {max, integer()} |
52                     {initial, integer()}
53
54              Constructor, creating and showing a spin control.
55
56              If value is non-empty, it will be shown in the text  entry  part
57              of  the control and if it has numeric value, the initial numeric
58              value of the control, as returned by getValue/1 will also be de‐
59              termined by it instead of by initial. Hence, it only makes sense
60              to specify initial if value is an empty string or  is  not  con‐
61              vertible  to  a  number, otherwise initial is simply ignored and
62              the number specified by value is used.
63
64              See: create/3
65
66       create(This, Parent) -> boolean()
67
68              Types:
69
70                 This = wxSpinCtrl()
71                 Parent = wxWindow:wxWindow()
72
73       create(This, Parent, Options :: [Option]) -> boolean()
74
75              Types:
76
77                 This = wxSpinCtrl()
78                 Parent = wxWindow:wxWindow()
79                 Option =
80                     {id, integer()} |
81                     {value, unicode:chardata()} |
82                     {pos, {X :: integer(), Y :: integer()}} |
83                     {size, {W :: integer(), H :: integer()}} |
84                     {style, integer()} |
85                     {min, integer()} |
86                     {max, integer()} |
87                     {initial, integer()}
88
89              Creation function called by the spin control constructor.
90
91              See new/2 for details.
92
93       setValue(This, Value) -> ok
94
95       setValue(This, Text) -> ok
96
97              Types:
98
99                 This = wxSpinCtrl()
100                 Text = unicode:chardata()
101
102              Sets the value of the spin control.
103
104              It is recommended to use the overload taking  an  integer  value
105              instead.
106
107              Notice  that, unlike wxTextCtrl:setValue/2, but like most of the
108              other setter methods in wxWidgets, calling this method does  not
109              generate  any  events  as events are only generated for the user
110              actions.
111
112       getValue(This) -> integer()
113
114              Types:
115
116                 This = wxSpinCtrl()
117
118              Gets the value of the spin control.
119
120       setRange(This, MinVal, MaxVal) -> ok
121
122              Types:
123
124                 This = wxSpinCtrl()
125                 MinVal = MaxVal = integer()
126
127              Sets range of allowable values.
128
129              Notice that calling this method may change the value of the con‐
130              trol if it's not inside the new valid range, e.g. it will become
131              minVal if it is less than  it  now.  However  no  wxEVT_SPINCTRL
132              event is generated, even if it the value does change.
133
134              Note:  Setting a range including negative values is silently ig‐
135              nored if current base is set to 16.
136
137       setSelection(This, From, To) -> ok
138
139              Types:
140
141                 This = wxSpinCtrl()
142                 From = To = integer()
143
144              Select the text in the text part of the  control  between  posi‐
145              tions from (inclusive) and to (exclusive).
146
147              This is similar to wxTextCtrl:setSelection/3.
148
149              Note: this is currently only implemented for Windows and generic
150              versions of the control.
151
152       getMin(This) -> integer()
153
154              Types:
155
156                 This = wxSpinCtrl()
157
158              Gets minimal allowable value.
159
160       getMax(This) -> integer()
161
162              Types:
163
164                 This = wxSpinCtrl()
165
166              Gets maximal allowable value.
167
168       destroy(This :: wxSpinCtrl()) -> ok
169
170              Destroys the object.
171
172
173
174wxWidgets team.                    wx 2.1.4                      wxSpinCtrl(3)
Impressum