1wxDatePickerCtrl(3) Erlang Module Definition wxDatePickerCtrl(3)
2
3
4
6 wxDatePickerCtrl - Functions for wxDatePickerCtrl class
7
9 This control allows the user to select a date. Unlike wxCalendarCtrl,
10 which is a relatively big control, wxDatePickerCtrl is implemented as a
11 small window showing the currently selected date. The control can be
12 edited using the keyboard, and can also display a popup window for more
13 user-friendly date selection, depending on the styles used and the
14 platform.
15
16 It is only available if wxUSE_DATEPICKCTRL is set to 1.
17
18 Styles
19
20 This class supports the following styles:
21
22 See: wxTimePickerCtrl (not implemented in wx), wxCalendarCtrl, wxDa‐
23 teEvent
24
25 This class is derived (and can use functions) from: wxPickerBase wxCon‐
26 trol wxWindow wxEvtHandler
27
28 wxWidgets docs: wxDatePickerCtrl
29
31 Event types emitted from this class: date_changed
32
34 wxDatePickerCtrl() = wx:wx_object()
35
37 new() -> wxDatePickerCtrl()
38
39 Default constructor.
40
41 new(Parent, Id) -> wxDatePickerCtrl()
42
43 Types:
44
45 Parent = wxWindow:wxWindow()
46 Id = integer()
47
48 new(Parent, Id, Options :: [Option]) -> wxDatePickerCtrl()
49
50 Types:
51
52 Parent = wxWindow:wxWindow()
53 Id = integer()
54 Option =
55 {date, wx:wx_datetime()} |
56 {pos, {X :: integer(), Y :: integer()}} |
57 {size, {W :: integer(), H :: integer()}} |
58 {style, integer()} |
59 {validator, wx:wx_object()}
60
61 Initializes the object and calls Create() (not implemented in
62 wx) with all the parameters.
63
64 getRange(This, Dt1, Dt2) -> boolean()
65
66 Types:
67
68 This = wxDatePickerCtrl()
69 Dt1 = Dt2 = wx:wx_datetime()
70
71 If the control had been previously limited to a range of dates
72 using setRange/3, returns the lower and upper bounds of this
73 range.
74
75 If no range is set (or only one of the bounds is set), dt1
76 and/or dt2 are set to be invalid.
77
78 Notice that when using a native MSW implementation of this con‐
79 trol the lower range is always set, even if setRange/3 hadn't
80 been called explicitly, as the native control only supports
81 dates later than year 1601.
82
83 Return: false if no range limits are currently set, true if at
84 least one bound is set.
85
86 getValue(This) -> wx:wx_datetime()
87
88 Types:
89
90 This = wxDatePickerCtrl()
91
92 Returns the currently entered date.
93
94 For a control with wxDP_ALLOWNONE style the returned value may
95 be invalid if no date is entered, otherwise it is always valid.
96
97 setRange(This, Dt1, Dt2) -> ok
98
99 Types:
100
101 This = wxDatePickerCtrl()
102 Dt1 = Dt2 = wx:wx_datetime()
103
104 Sets the valid range for the date selection.
105
106 If dt1 is valid, it becomes the earliest date (inclusive) ac‐
107 cepted by the control. If dt2 is valid, it becomes the latest
108 possible date.
109
110 Notice that if the current value is not inside the new range, it
111 will be adjusted to lie inside it, i.e. calling this method can
112 change the control value, however no events are generated by it.
113
114 Remark: If the current value of the control is outside of the
115 newly set range bounds, the behaviour is undefined.
116
117 setValue(This, Dt) -> ok
118
119 Types:
120
121 This = wxDatePickerCtrl()
122 Dt = wx:wx_datetime()
123
124 Changes the current value of the control.
125
126 The date should be valid unless the control was created with
127 wxDP_ALLOWNONE style and included in the currently selected
128 range, if any.
129
130 Calling this method does not result in a date change event.
131
132 destroy(This :: wxDatePickerCtrl()) -> ok
133
134 Destroys the object.
135
136
137
138wxWidgets team. wx 2.2.2 wxDatePickerCtrl(3)