iwidgets::spindate(1)

πŸ’– NAME πŸ’–

iwidgets::spindate β€” create and manipulate time spinner widgets. Yep bestie, this is your date-picker-in-a-widget moment, and it lives in the [incr Widgets] family, filed under iwidgets::spindate(1). πŸ—“οΈβœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

iwidgets::spindate pathName ?options?

🌸 INHERITANCE 🌸

The family tree, and it's giving legacy:

itk::Widget <- iwidgets::Spindate

✨ STANDARD OPTIONS ✨

  • background
  • cursor
  • foreground
  • relief

See the "options" manual entry for details on the standard options. No notes, they're the classics. πŸ’…


πŸŽ€ ASSOCIATED OPTIONS πŸŽ€

These cuties come in from other widgets, so you already know them:

  • textBackground, textFont β€” see the "entryfield" manual entry for the deets on these associated options.
  • labelFont, labelMargin β€” see the "labeledwidget" manual entry for the deets on these associated options.
  • arrowOrient, repeatDelay, repeatInterval β€” see the "spinner" manual entry for the deets on these associated options.

πŸ‘‘ WIDGET-SPECIFIC OPTIONS πŸ‘‘

This is the main character section, fr fr. Every one of these is yours to set:

  • dateMargin β€” Name: dateMargin, Class: Margin, Command-Line Switch: -datemargin Specifies the margin space between the month, day, and year spinners, in any of the forms accpetable to Tcl_GetPixels. The default is 1 pixel. (Yes, we said accpetable. The docs said it first, we're just the messenger. πŸ™ˆ)
  • dayLabel β€” Name: dayLabel, Class: Text, Command-Line Switch: -daylabel Specifies the text of the label for the day spinner. The default is "Day".
  • dayOn β€” Name: dayOn, Class: dayOn, Command-Line Switch: -dayon Specifies whether or not to display the day spinner, in any of the forms acceptable to Tcl_GetBoolean. The default is true.
  • dayWidth β€” Name: dayWidth, Class: Width, Command-Line Switch: -daywidth Specifies the width of the day spinner, in any of the forms acceptable to Tcl_GetPixels. The default is 3 pixels.
  • labelPos β€” Name: labelPos, Class: Position, Command-Line Switch: -labelpos Specifies the position of the label along the sides of the various spinners: n, e, s, or w. The default is w.
  • monthFormat β€” Name: monthFormat, Class: MonthFormat, Command-Line Switch: -monthformat Specifies the format of month display: integer (1-12), or brief strings (Jan - Dec), or full strings (January - December).
  • monthLabel β€” Name: monthLabel, Class: Text, Command-Line Switch: -monthlabel Specifies the text of the label for the month spinner. The default is "Month".
  • monthOn β€” Name: monthOn, Class: monthOn, Command-Line Switch: -monthon Specifies whether or not to display the month spinner, in any of the forms acceptable to Tcl_GetBoolean. The default is true.
  • monthWidth β€” Name: monthWidth, Class: Width, Command-Line Switch: -monthwidth Specifies the width of the month spinner, in any of the forms acceptable to Tcl_GetPixels. The default is 3 pixels.
  • orient β€” Name: orient, Class: Orient, Command-Line Switch: -orient Specifies the orientation of the month, day, and year spinners: vertical or horizontal. The default is horizontal.
  • yearDigits β€” Name: yearDigits, Class: YearDigits, Command-Line Switch: -yeardigits Specifies the number of digits to be displayed as the value for the year spinner. The valid values are 2 and 4. The default is 2.
  • yearLabel β€” Name: yearLabel, Class: Text, Command-Line Switch: -yearlabel Specifies the text of the label for the year spinner. The default is "Year".
  • yearOn β€” Name: yearOn, Class: yearOn, Command-Line Switch: -yearon Specifies whether or not to display the year spinner, in any of the forms acceptable to Tcl_GetBoolean. The default is true.
  • yearWidth β€” Name: yearWidth, Class: Width, Command-Line Switch: -yearwidth Specifies the width of the year spinner, in any of the forms acceptable to Tcl_GetPixels. The default is 3 pixels.

πŸ’… DESCRIPTION πŸ’…

The iwidgets::spindate command creates a set of spinners for use in date value entry. The set includes an month, day, and year spinner widget. Three spinners, one glow-up. Obsessed. 🫢


πŸ”₯ METHODS πŸ”₯

The iwidgets::spindate command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form:

pathName option ?arg arg ...?

Option and the args determine the exact behavior of the command. The following commands are possible for spindate widgets:

🌈 WIDGET-SPECIFIC METHODS 🌈

  • pathName cget option β€” Returns the current value of the configuration option given by option. Option may have any of the values accepted by the iwidgets::spindate command.
  • pathName configure ?option? ?value option value ...? β€” Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iwidgets::spindate command.
  • pathName get ?format? β€” Returns the current contents of the spindate widget in a format of string or as an integer clock value, using the -string and -clicks format options respectively. The default is by string. Reference the clock command for more information on obtaining dates and their formats.
  • pathName show date β€” Changes the currently displayed date to be that of the date argument. The date may be specified either as a string, an integer clock value or the keyword "now". Reference the clock command for more information on obtaining dates and their formats.

πŸ¦‹ COMPONENTS πŸ¦‹

The little guys that make the whole fit work:

  • month β€” Name: month, Class: Spinner The month spinner component is the month spinner of the date spinner. See the Spinner widget manual entry for details on the month component item.
  • day β€” Name: day, Class: Spinint The day spinner component is the day spinner of the date spinner. See the SpinInt widget manual entry for details on the day component item.
  • year β€” Name: year, Class: Spinint The year spinner component is the year spinner of the date spinner. See the SpinInt widget manual entry for fordetails on the year component item.

πŸ“ EXAMPLE πŸ“

Here's the vibe, copy-paste ready:

package require Iwidgets 4.0 iwidgets::spindate .sd pack .sd -padx 10 -pady 10

πŸ’œ AUTHOR πŸ’œ

Sue Yockey, Mark L. Ulferts. Legends, honestly. πŸ‘‘


⭐ KEYWORDS ⭐

spindate, spinint, spinner, entryfield, entry, widget


okay that's the whole page, no cap, every last flag and default accounted for πŸ’– This one rides under Tk, bestie, and the manual name is iwidgets::spindate(1) β€” now go build something iconic with it. πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from