iwidgets::timefield(1)
π iwidgets::timefield β the manual page, but make it cute π
okay bestie, welcome to iwidgets::timefield from the [incr Widgets] collection. yes it's a whole manual page, no it's not boring, sit down, hydrate, let's go π«Ά
β¨ NAME β¨
iwidgets::timefield β bestie, this makes and drives a time field widget. it's the widget. that's the vibe. periodt π
πΈ SYNOPSIS πΈ
iwidgets::timefield pathName ?options?
that's it. that's the whole summoning ritual. pathName is your widget's name, ?options? is whatever you wanna pass β¨
π¦ INHERITANCE π¦
the family tree, and yes she comes from a good family:
itk::Widget <- iwidgets::LabeledWidget <- iwidgets::Timefield
itk::Widget is the ancestor, iwidgets::LabeledWidget is the parent, and iwidgets::Timefield is the main character π
π STANDARD OPTIONS π
these are the classics, she inherited them, she's wearing them well:
backgroundborderWidthcursorexportSelectionforegroundhighlightColorhighlightThicknessinsertBackgroundjustifyrelief
if you want the deets on any of these, go read the "options" manual entry. she's not gonna re-explain her whole wardrobe, iykyk β¨
π INHERITED OPTIONS π
these come from the labeled-widget side of the family:
disabledForegroundlabelBitmaplabelFontlabelImagelabelMarginlabelPoslabelTextlabelVariablestatesticky
full tea on all of these lives in the "labeledwidget" class manual entry π«Ά
π WIDGET-SPECIFIC OPTIONS π
okay THIS is the section, this is where she gets specific, this is the good stuff π
-childsitepos(Name:childSitePos, Class:Position) β says where the child site sits inside the time field. your choices aren,s,e, orw. the default ise. iconic default, honestly.-command(Name:command, Class:Command) β a Tcl command that gets run when a Return key press event is detected. so like, you press Return, she does the thing. slay.-gmt(Name:gmt, Class:Gmt) β decides whether the time is calculated relative to Greenwich Mean Time. takes a boolean value. the default isno.-state(Name:state, Class:State) β the state of the timefield, and there are exactly two options:normalordisabled. if she'sdisabledthen input is not accepted, that's it, door's closed bestie. the default isnormal.-textbackground(Name:textBackground, Class:Background) β the background color for the inside textual portion of the entry field. the value can be in any of the forms acceptable toTk_GetColor.-textfont(Name:textFont, Class:Font) β the name of the font used to display text in the timefield. the value can be given in any of the forms acceptable toTk_GetFont.
π DESCRIPTION π
iwidgets::timefield creates an enhanced text entry widget whose whole purpose in life is time entry, and she comes with various degrees of built-in intelligence. she's smart. she knows what a time is. she will tell you if you're wrong. we love a self-aware widget π
β¨ METHODS β¨
the iwidgets::timefield command creates a brand new Tcl command whose name is pathName. you use that command to do operations on the widget. general form, look:
pathName option ?arg arg ...?
option plus the args decide exactly what the command does. here's what's on the menu for timefield widgets, babes:
π« WIDGET-SPECIFIC METHODS π«
pathName cget optionβ returns the current value of the configuration option given byoption. andoptioncan be any of the values that theiwidgets::timefieldcommand accepts. peek at the settings, no notes πpathName configure ?option? ?value option value ...?β query or modify the widget's configuration options. if you pass nooptionat all, she returns a list describing all the available options forpathName(go look atTk_ConfigureInfoif you wanna know the format of that list). if you giveoptionwith novalue, you get a list describing that one named option β and that list will be identical to the corresponding sublist of the value you'd get if you hadn't specified any option. and if you pass one or more option-value pairs, she modifies the given widget option(s) to have the given value(s), and in that case the command returns an empty string.optionmay have any of the values accepted by theiwidgets::timefieldcommand.pathName get ?format?β returns the current contents of the timefield, in a format ofstringor as an integer clock value, using the-stringand-clicksformat options respectively. the default is bystring. go reference theclockcommand if you want more info on obtaining times and their formats πpathName isvalidβ returns a boolean indication of whether the currently displayed time value is valid. example, because examples are everything:12:59:59is valid, whereas25:59:59is invalid. she said 25 o'clock is not a thing, bestie πpathName show timeβ changes the currently displayed time to be that of thetimeargument.timecan be specified as a string, an integer clock value, or the keyword"now"(which is the default). reference theclockcommand for more info on obtaining times and their formats β¨
π§ COMPONENTS π§
time(Class:Entry) β this component provides the entry field for time input and display. see the "entry" widget manual entry for the deets on the time component item.
π EXAMPLE π
here's the moment you've all been waiting for, the code, the whole code, nothing but the code:
package require Iwidgets 4.0
proc returnCmd {} {
puts [.tf get]
}
iwidgets::timefield .tf -command returnCmd
pack .tf -fill x -expand yes -padx 10 -pady 10
she's built, she's packed, she's returning. ate and left no crumbs π₯
π AUTHOR π
John A. Tucker and Mark L. Ulferts β thank you for your service, kings π
π KEYWORDS π
timefield, widget
one tiny thing bestie: this page is part of Tk and it's the iwidgets::timefield(1) manual page. that's the source, that's the version, that's the name β no cap π bye ily, go build something cute π¦β¨
π¦ where this page comes from
- debian bookworm: iwidgets4-doc 4.1.1-2.1
- debian trixie: iwidgets4-doc 4.1.1-4
- ubuntu jammy: iwidgets4-doc 4.1.1-2.1
- ubuntu noble: iwidgets4-doc 4.1.1-2.1
- ubuntu resolute: iwidgets4-doc 4.1.1-4
- ubuntu stonking: iwidgets4-doc 4.1.1-4
- Copyright (c) 1997 DSC Technologies Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms