Difference between revisions of "Documentation/DevGuide/Basic/Time Field"
From Apache OpenOffice Wiki
< Documentation | DevGuide
OOoWikiBot (talk | contribs) m (FINAL VERSION FOR L10N) |
m |
||
| Line 9: | Line 9: | ||
{{DISPLAYTITLE:Time Field}} | {{DISPLAYTITLE:Time Field}} | ||
The time field control <idl>com.sun.star.awt.UnoControlDateField</idl> displays and enters time values. The time value are set and retrieved by the <code>Time</code> property. The time value is of type <code>Long</code> and is specified in the format HHMMSShh, where HH are hours, MM are minutes, SS are seconds and hh are hundredth seconds. For example, the time 15:18:23 is set by: | The time field control <idl>com.sun.star.awt.UnoControlDateField</idl> displays and enters time values. The time value are set and retrieved by the <code>Time</code> property. The time value is of type <code>Long</code> and is specified in the format HHMMSShh, where HH are hours, MM are minutes, SS are seconds and hh are hundredth seconds. For example, the time 15:18:23 is set by: | ||
| − | + | <source lang="oobas"> | |
oTimeFieldModel = oDialog.Model.TimeField1 | oTimeFieldModel = oDialog.Model.TimeField1 | ||
oTimeFieldModel.Time = 15182300 | oTimeFieldModel.Time = 15182300 | ||
| − | + | </source> | |
The minimum and maximum time value that can be entered is given by the <code>TimeMin</code> and <code>TimeMax</code> property. The format of the displayed time is specified by the <code>TimeFormat</code> property. | The minimum and maximum time value that can be entered is given by the <code>TimeMin</code> and <code>TimeMax</code> property. The format of the displayed time is specified by the <code>TimeFormat</code> property. | ||
Revision as of 10:08, 22 October 2009
The time field control com.sun.star.awt.UnoControlDateField displays and enters time values. The time value are set and retrieved by the Time property. The time value is of type Long and is specified in the format HHMMSShh, where HH are hours, MM are minutes, SS are seconds and hh are hundredth seconds. For example, the time 15:18:23 is set by:
oTimeFieldModel = oDialog.Model.TimeField1
oTimeFieldModel.Time = 15182300
The minimum and maximum time value that can be entered is given by the TimeMin and TimeMax property. The format of the displayed time is specified by the TimeFormat property.
The time value is checked during input by setting the StrictFormat property to True.
Short time format is currently not working.
| Content on this page is licensed under the Public Documentation License (PDL). |