gDatePick
| Definition: |
include xpGUI.e
gdx id = gDatePick([rtn value_changed=NULL,] string attributes="", dword_seq args={}) |
| Description: |
Creates a date editing interface element, which can drop-down a calendar for selecting a date.
In Windows and HTML is a native element. In GTK is a custom element. [DEV not yet attempted, to be tried in hll first] value_changed: (optional) a procedure to be invoked when the contents are changed, see VALUE_CHANGED below. For more information on the attributes and args parameters see gSetAttributes(). This is a paranormalised function. (see technicalia) Returns the identifier of the created element. |
| pwa/p2js: | Supported. |
| Example: |
-- demo\xpGUI\gDatePick.exw
include xpGUI.e
gdx dp = gHbox({gDatePick()},"MARGIN=13x13"),
dlg = gDialog(dp,`gDatePick`,`SIZE=240x80`)
gShow(dlg)
gMainLoop()
and with the calendar drop-down manually opened:
|
| Notes: |
There is no equivalent for an IupCalendar, ie the drop-down shown above being permanently on screen. (HTML/CSS/JavaScript has a perfectly decent drop-down but no always visible equivalent that I can find, GTK the opposite, WinAPI has both.) Within the drop-down, you can "scroll up" to months, years, and decades, in a platform-specific manner. |
| Attributes: | |
| ? VALUE+ |
the current date always in the format "year/month/day" (eg "%d/%d/%d"). Can be set to "TODAY". Default value is the today date. |
| Handlers: | |
| ? VALUE_CHANGED |
Called after the value was interactively changed by the user.
procedure valuechanged_cb(gdx id) id: identifier of the element that activated the event. |
| also | KEY: All common handlers are supported. |