- WIDGET HIERARCHY
- SEE ALSO
Gtk2::Ex::TimeEntry -- Widget for entering times
use Gtk2::Ex::TimeEntry; $te = Gtk2::Ex::TimeEntry->new (value => '13:00:00'); $te->set_value('1pm'); $te->get_value;
Gtk2::Widget Gtk2::Entry Gtk2::Ex::TimeEntry
Gtk2::Ex::TimeEntry displays and edits a time in HH::MM PM format with some convienence functions.
Use the up and down keys to modify the invidual components of the value, and the left and right keys to navigate between them. Pressing up or down while the entire contents of the entry is selected (such as when you focus-in) modifies the value in 15 minute increments.
The time is stored in HH:MM:SS format (but displayed in HH:MM PM format). If you enter a value 24:00:00 or higher, it will loop back around.
You can also type a time into the entry in various formats, which will be parsed and then displayed in the entry in HH:MM PM format. Here are some examples of things you can enter into the widget and the resulting internal and display values.
INPUT VALUE DISPLAY 1 01:00:00 01:00 AM 10 10:00:00 10:00 AM 120 01:20:00 01:20 AM 1:20 01:20:00 01:20 AM 120pm 13:20:00 01:20 PM 01:20 PM 13:20:00 01:20 PM 30:20:00 04:20:00 04:20 AM
$te = Gtk2::Ex::TimeEntry->new (key=>value,...)
Create and return a new TimeEntry widget. Optional key/value pairs set initial properties per
my $te = Gtk2::Ex::TimeEntry->new (value => '16:00:00');
Returns the name of the currently selected component. Valid values are hours, minutes, meridiem, and all. An emptry string will be returned if the selection bounds contains less than 1 individual component, or more than 1 component but less than all of them.
Highlights the given component, which can then be edited by typing over it or pressing the arrow keys up or down. Acceptable values are hours, minutes, meridiem, and all.
Set the widget value to the current time.
value (string, default '')
The current time format in HH:MM:SS format. Can be set to an empty string for no time. When setting the value you, you may pass any acceptable value outlined in the widget description, but the time will always be stored in HH:MM:SS format.
Jeffrey Ray Hallock <jeffrey.ray at ragingpony dot com>
None known. Please send bugs to <jeffrey.ray at ragingpony dot com>. Patches and suggestions welcome.
Gtk2-Ex-TimeEntry is Copyright 2009 Jeffrey Hallock
Gtk2-Ex-TimeEntry is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
Gtk2-Ex-TimeEntry is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Gtk2-Ex-TimeEntry. If not, see http://www.gnu.org/licenses/.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 470:
=back doesn't take any parameters, but you said =back 4